llvm-project/compiler-rt/lib
Eric Christopher d641b53f93 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
2015-04-28 22:54:51 +00:00
..
BlocksRuntime Move tests for BlocksRuntime and builtins to corresponding directories under test/ 2014-02-14 09:47:31 +00:00
asan [asan] Print SHADOW_SCALE and SHADOW_GRANULARITY as decimal values. 2015-04-25 10:57:35 +00:00
builtins Add hard float versions of FP to LL conversions 2015-04-06 11:54:51 +00:00
dfsan Make check_custom_wrappers.sh work on FreeBSD 2015-04-12 10:54:46 +00:00
interception [ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to BindIoCompletionCallback 2015-03-17 16:50:59 +00:00
lsan [LSan] Add function attribute forgotten in r235728. 2015-04-24 19:45:46 +00:00
msan Export __ubsan_* symbols from MSan and TSan runtimes. 2015-04-28 01:20:34 +00:00
profile This change is the first of 3 patches to add support for specifying 2015-04-28 22:54:51 +00:00
sanitizer_common [asan] Use dl_iterate_phdr on Android. 2015-04-28 18:50:32 +00:00
tsan tsan: fix a bug memory access handling 2015-04-28 18:08:42 +00:00
ubsan [UBSan] Make sure proper error summary is printed for -fsanitize=float-cast-overflow. 2015-04-23 01:08:31 +00:00
CMakeLists.txt [UBSan] Embed UBSan into ASan runtime (compiler-rt part). 2015-04-01 22:42:36 +00:00
Makefile.mk Remove support for building sanitizers from Makefile/autoconf build on Linux. 2015-02-18 22:26:49 +00:00