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)
commit7dcadc6dbe42a91cd88804a5994eab987b42c753
tree6290e613fb9a04d9781920cf8d33bdc344b8e875
parent1f3ea7b6b5ca02b18af414083eb4b9599ea3a946
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.

llvm-svn: 167269
llvm/runtime/libprofile/CommonProfiling.c