diff options
author | Eric Christopher <echristo@gmail.com> | 2015-04-28 22:54:51 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-04-28 22:54:51 +0000 |
commit | d641b53f931bc6246cdb56aff3c1e00abd049bfe (patch) | |
tree | b68f1d7b3542943c13a3380054f438fbcaf9b303 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 0ba41a68417cda5a1c88ee6a91921ca7a3f84b56 (diff) | |
download | llvm-d641b53f931bc6246cdb56aff3c1e00abd049bfe.zip llvm-d641b53f931bc6246cdb56aff3c1e00abd049bfe.tar.gz llvm-d641b53f931bc6246cdb56aff3c1e00abd049bfe.tar.bz2 |
This change is the first of 3 patches to add support for specifying
the profile output from the command line via -fprofile-instr-generate=<path>,
where the specified output path/file will be overridden by the
LLVM_PROFILE_FILE environment variable.
Several changes are made to the runtime to support this:
Add a new interface __llvm_profile_override_default_filename that will
set the profile output filename, but allows LLVM_PROFILE_FILE to override.
This is the interface used by the new option.
Refactor the pid-expansion done for LLVM_PROFILE_FILE into a separate
routine that can be shared by the various filename setting routines
(so that the filename from the option can also use the "%p" syntax).
Move the truncation into setFilename, and only truncate if there is a
new filename specified (to maintain support for appending to the same
profile file in the case of multiple shared objects built with profiling).
Move the handling for a NULL filename passed to __llvm_profile_set_filename and
__llvm_profile_override_default_filename into the new setFilenamePossiblyWithPid
routine. This now correctly resets the output file to default.profraw
instead of NULL.
The handling for a null LLVM_PROFILE_FILE (which should not reset) is done
by caller setFilenameFromEnvironment.
Patch by Teresa Johnson.
llvm-svn: 236055
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions