[compiler-rt] r253907 - [PGO] Unify section name, section symbol definitions (Darwin)
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 11:48:25 PST 2015
Author: davidxl
Date: Mon Nov 23 13:48:25 2015
New Revision: 253907
URL: http://llvm.org/viewvc/llvm-project?rev=253907&view=rev
Log:
[PGO] Unify section name, section symbol definitions (Darwin)
Replace hard-coded references to names to key section and section
symbols with common macro definitions.
Modified:
compiler-rt/trunk/lib/profile/InstrProfilingPlatformDarwin.c
Modified: compiler-rt/trunk/lib/profile/InstrProfilingPlatformDarwin.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPlatformDarwin.c?rev=253907&r1=253906&r2=253907&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPlatformDarwin.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingPlatformDarwin.c Mon Nov 23 13:48:25 2015
@@ -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) {
More information about the llvm-commits
mailing list