From d200b27f08f9a2c00a6937eaeb610df1490fa805 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Mon, 23 Nov 2015 19:48:25 +0000 Subject: [PATCH] [PGO] Unify section name, section symbol definitions (Darwin) Replace hard-coded references to names to key section and section symbols with common macro definitions. llvm-svn: 253907 --- .../lib/profile/InstrProfilingPlatformDarwin.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c index 97c76366e1c9..3da0f18c5742 100644 --- a/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c +++ b/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c @@ -13,17 +13,21 @@ /* Use linker magic to find the bounds of the Data section. */ LLVM_LIBRARY_VISIBILITY extern __llvm_profile_data - DataStart __asm("section$start$__DATA$__llvm_prf_data"); + DataStart __asm("section$start$__DATA$" INSTR_PROF_DATA_SECT_NAME_STR); LLVM_LIBRARY_VISIBILITY -extern __llvm_profile_data DataEnd __asm("section$end$__DATA$__llvm_prf_data"); +extern __llvm_profile_data + DataEnd __asm("section$end$__DATA$" INSTR_PROF_DATA_SECT_NAME_STR); LLVM_LIBRARY_VISIBILITY -extern char NamesStart __asm("section$start$__DATA$__llvm_prf_names"); +extern char + NamesStart __asm("section$start$__DATA$" INSTR_PROF_NAME_SECT_NAME_STR); LLVM_LIBRARY_VISIBILITY -extern char NamesEnd __asm("section$end$__DATA$__llvm_prf_names"); +extern char NamesEnd __asm("section$end$__DATA$" INSTR_PROF_NAME_SECT_NAME_STR); LLVM_LIBRARY_VISIBILITY -extern uint64_t CountersStart __asm("section$start$__DATA$__llvm_prf_cnts"); +extern uint64_t + CountersStart __asm("section$start$__DATA$" INSTR_PROF_CNTS_SECT_NAME_STR); LLVM_LIBRARY_VISIBILITY -extern uint64_t CountersEnd __asm("section$end$__DATA$__llvm_prf_cnts"); +extern uint64_t + CountersEnd __asm("section$end$__DATA$" INSTR_PROF_CNTS_SECT_NAME_STR); LLVM_LIBRARY_VISIBILITY const __llvm_profile_data *__llvm_profile_begin_data(void) {