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/InstrProfilingBuffer.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/InstrProfilingBuffer.c')
| -rw-r--r-- | compiler-rt/lib/profile/InstrProfilingBuffer.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingBuffer.c b/compiler-rt/lib/profile/InstrProfilingBuffer.c index 130b30e7adc..4f841268757 100644 --- a/compiler-rt/lib/profile/InstrProfilingBuffer.c +++ b/compiler-rt/lib/profile/InstrProfilingBuffer.c @@ -12,7 +12,7 @@ #include <string.h> -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY uint64_t __llvm_profile_get_size_for_buffer(void) { const __llvm_profile_data *DataBegin = __llvm_profile_begin_data(); const __llvm_profile_data *DataEnd = __llvm_profile_end_data(); @@ -27,12 +27,11 @@ uint64_t __llvm_profile_get_size_for_buffer(void) { #define PROFILE_RANGE_SIZE(Range) (Range##End - Range##Begin) -__attribute__((visibility("hidden"))) +LLVM_LIBRARY_VISIBILITY uint64_t __llvm_profile_get_size_for_buffer_internal( - const __llvm_profile_data *DataBegin, - const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, - const uint64_t *CountersEnd, const char *NamesBegin, - const char *NamesEnd) { + const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, + const uint64_t *CountersBegin, const uint64_t *CountersEnd, + const char *NamesBegin, const char *NamesEnd) { /* Match logic in __llvm_profile_write_buffer(). */ const uint64_t NamesSize = PROFILE_RANGE_SIZE(Names) * sizeof(char); const uint8_t Padding = __llvm_profile_get_num_padding_bytes(NamesSize); @@ -56,12 +55,12 @@ static uint32_t bufferWriter(ProfDataIOVec *IOVecs, uint32_t NumIOVecs, return 0; } -__attribute__((visibility("hidden"))) int +LLVM_LIBRARY_VISIBILITY __llvm_profile_write_buffer(char *Buffer) { return llvmWriteProfData(bufferWriter, Buffer, 0, 0); } -__attribute__((visibility("hidden"))) int __llvm_profile_write_buffer_internal( +LLVM_LIBRARY_VISIBILITY int __llvm_profile_write_buffer_internal( char *Buffer, const __llvm_profile_data *DataBegin, const __llvm_profile_data *DataEnd, const uint64_t *CountersBegin, const uint64_t *CountersEnd, const char *NamesBegin, const char *NamesEnd) { |

