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/InstrProfilingPlatformDarwin.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/InstrProfilingPlatformDarwin.c')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c index 02299cc4630..97c76366e1c 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c @@ -11,33 +11,32 @@ #if defined(__APPLE__) /* Use linker magic to find the bounds of the Data section. */ -__attribute__((visibility("hidden"))) -extern __llvm_profile_data DataStart __asm("section$start$__DATA$__llvm_prf_data"); -__attribute__((visibility("hidden"))) -extern __llvm_profile_data DataEnd __asm("section$end$__DATA$__llvm_prf_data"); -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY +extern __llvm_profile_data + DataStart __asm("section$start$__DATA$__llvm_prf_data"); +LLVM_LIBRARY_VISIBILITY +extern __llvm_profile_data DataEnd __asm("section$end$__DATA$__llvm_prf_data"); +LLVM_LIBRARY_VISIBILITY extern char NamesStart __asm("section$start$__DATA$__llvm_prf_names"); -__attribute__((visibility("hidden"))) -extern char NamesEnd __asm("section$end$__DATA$__llvm_prf_names"); -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY +extern char NamesEnd __asm("section$end$__DATA$__llvm_prf_names"); +LLVM_LIBRARY_VISIBILITY extern uint64_t CountersStart __asm("section$start$__DATA$__llvm_prf_cnts"); -__attribute__((visibility("hidden"))) -extern uint64_t CountersEnd __asm("section$end$__DATA$__llvm_prf_cnts"); +LLVM_LIBRARY_VISIBILITY +extern uint64_t CountersEnd __asm("section$end$__DATA$__llvm_prf_cnts"); -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *__llvm_profile_begin_data(void) { return &DataStart; } -__attribute__((visibility("hidden"))) -const __llvm_profile_data *__llvm_profile_end_data(void) { - return &DataEnd; -} -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY +const __llvm_profile_data *__llvm_profile_end_data(void) { return &DataEnd; } +LLVM_LIBRARY_VISIBILITY const char *__llvm_profile_begin_names(void) { return &NamesStart; } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY const char *__llvm_profile_end_names(void) { return &NamesEnd; } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY uint64_t *__llvm_profile_begin_counters(void) { return &CountersStart; } -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY uint64_t *__llvm_profile_end_counters(void) { return &CountersEnd; } #endif |

