diff options
| author | Xinliang David Li <davidxl@google.com> | 2015-11-23 04:38:17 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2015-11-23 04:38:17 +0000 |
| commit | 6fe18f4fbaffcbe25ebda151cc8beaaf7a730f5b (patch) | |
| tree | 5f5cbbb0856a29560d07b5f4d8d85090b5e36545 /compiler-rt/lib/profile/InstrProfilingFile.c | |
| parent | 970fe56e4102d92c71ed1f732f047738e8c081c7 (diff) | |
| download | bcm5719-llvm-6fe18f4fbaffcbe25ebda151cc8beaaf7a730f5b.tar.gz bcm5719-llvm-6fe18f4fbaffcbe25ebda151cc8beaaf7a730f5b.zip | |
[PGO] Compiler-rt cleanup -- introduces macros for various macros
This makes code more readable and be made more portable in the future.
There is no functional change.
llvm-svn: 253845
Diffstat (limited to 'compiler-rt/lib/profile/InstrProfilingFile.c')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingFile.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c index 742df21d946..5663bab34de 100644 --- a/compiler-rt/lib/profile/InstrProfilingFile.c +++ b/compiler-rt/lib/profile/InstrProfilingFile.c @@ -164,7 +164,7 @@ static void setFilenameAutomatically(void) { resetFilenameToDefault(); } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY void __llvm_profile_initialize_file(void) { /* Check if the filename has been initialized. */ if (__llvm_profile_CurrentFilename) @@ -174,12 +174,12 @@ void __llvm_profile_initialize_file(void) { setFilenameAutomatically(); } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY void __llvm_profile_set_filename(const char *Filename) { setFilenamePossiblyWithPid(Filename); } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY void __llvm_profile_override_default_filename(const char *Filename) { /* If the env var is set, skip setting filename from argument. */ const char *Env_Filename = getenv("LLVM_PROFILE_FILE"); @@ -188,7 +188,7 @@ void __llvm_profile_override_default_filename(const char *Filename) { setFilenamePossiblyWithPid(Filename); } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY int __llvm_profile_write_file(void) { int rc; @@ -204,11 +204,9 @@ int __llvm_profile_write_file(void) { return rc; } -static void writeFileWithoutReturn(void) { - __llvm_profile_write_file(); -} +static void writeFileWithoutReturn(void) { __llvm_profile_write_file(); } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY int __llvm_profile_register_write_file_atexit(void) { static int HasBeenRegistered = 0; |

