PGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
authorManman Ren <mren@apple.com>
Fri, 2 Nov 2012 01:10:15 +0000 (01:10 +0000)
committerManman Ren <mren@apple.com>
Fri, 2 Nov 2012 01:10:15 +0000 (01:10 +0000)
commit9b25ff66dd1aff9f745fa0fa08e7130c942aec86
tree7101bb0f187b35cc9b93e5c69a261c46c6e51b25
parent0a1544d2fd63d8101dc7d50974e65c95a0f6f98d
PGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
environment variable.

This allows parallel make for profiling code, without it there are file
collisions as each parallel run uses the default file name.

There is already code in the runtime library to specify the output file name
via the command line, but this only works for programs which already process
argc/argv.  This patch builds on that support.

Patch by Alastair Murray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167269 91177308-0d34-0410-b5e6-96231b3b80d8
runtime/libprofile/CommonProfiling.c