From cc0d7eeb6dbf4aa1efad895ff2b8568000b02461 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 4 Sep 2014 15:45:31 +0000 Subject: profile: Avoid name collisions between instrumentation and runtime The naming scheme we're using for counters in profile data shares a prefix with some fixed names we use for the runtime, notably __llvm_profile_data_begin and _end. Embarrassingly, this means a function called begin() can't be instrumented. This modifies the runtime names so as not to collide with the instrumentation. llvm-svn: 217166 --- compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c') diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c index 74019772d36..02299cc4630 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c @@ -25,19 +25,19 @@ __attribute__((visibility("hidden"))) extern uint64_t CountersEnd __asm("section$end$__DATA$__llvm_prf_cnts"); __attribute__((visibility("hidden"))) -const __llvm_profile_data *__llvm_profile_data_begin(void) { +const __llvm_profile_data *__llvm_profile_begin_data(void) { return &DataStart; } __attribute__((visibility("hidden"))) -const __llvm_profile_data *__llvm_profile_data_end(void) { +const __llvm_profile_data *__llvm_profile_end_data(void) { return &DataEnd; } __attribute__((visibility("hidden"))) -const char *__llvm_profile_names_begin(void) { return &NamesStart; } +const char *__llvm_profile_begin_names(void) { return &NamesStart; } __attribute__((visibility("hidden"))) -const char *__llvm_profile_names_end(void) { return &NamesEnd; } +const char *__llvm_profile_end_names(void) { return &NamesEnd; } __attribute__((visibility("hidden"))) -uint64_t *__llvm_profile_counters_begin(void) { return &CountersStart; } +uint64_t *__llvm_profile_begin_counters(void) { return &CountersStart; } __attribute__((visibility("hidden"))) -uint64_t *__llvm_profile_counters_end(void) { return &CountersEnd; } +uint64_t *__llvm_profile_end_counters(void) { return &CountersEnd; } #endif -- cgit v1.2.3