[compiler-rt] r270875 - Add segment prefix for darwin

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 10:21:24 PDT 2016


Author: davidxl
Date: Thu May 26 12:21:24 2016
New Revision: 270875

URL: http://llvm.org/viewvc/llvm-project?rev=270875&view=rev
Log:
Add segment prefix for darwin

Modified:
    compiler-rt/trunk/lib/profile/InstrProfilingValue.c

Modified: compiler-rt/trunk/lib/profile/InstrProfilingValue.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingValue.c?rev=270875&r1=270874&r2=270875&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingValue.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingValue.c Thu May 26 12:21:24 2016
@@ -26,11 +26,16 @@ static int hasNonDefaultValsPerSite = 0;
 #define INSTR_PROF_VNODE_POOL_SIZE 1024
 
 #ifndef _MSC_VER
+#if defined(__APPLE__)
+#define VPSEG "__DATA,"
+#else
+#define VPSEG ""
+#endif
 /* A shared static pool in addition to the vnodes statically
  * allocated by the compiler.  */
 COMPILER_RT_VISIBILITY ValueProfNode
     lprofValueProfNodes[INSTR_PROF_VNODE_POOL_SIZE] COMPILER_RT_SECTION(
-        INSTR_PROF_VNODES_SECT_NAME_STR);
+       VPSEG INSTR_PROF_VNODES_SECT_NAME_STR);
 #endif
 
 COMPILER_RT_VISIBILITY uint32_t VPMaxNumValsPerSite =




More information about the llvm-commits mailing list