[compiler-rt] r276385 - [Profile] cleanup: do not reference name directly of vars shared between rt and llvm
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 21:08:16 PDT 2016
Author: davidxl
Date: Thu Jul 21 23:08:16 2016
New Revision: 276385
URL: http://llvm.org/viewvc/llvm-project?rev=276385&view=rev
Log:
[Profile] cleanup: do not reference name directly of vars shared between rt and llvm
Modified:
compiler-rt/trunk/lib/profile/InstrProfData.inc
compiler-rt/trunk/lib/profile/InstrProfiling.c
compiler-rt/trunk/lib/profile/InstrProfiling.h
compiler-rt/trunk/lib/profile/InstrProfilingRuntime.cc
Modified: compiler-rt/trunk/lib/profile/InstrProfData.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfData.inc?rev=276385&r1=276384&r2=276385&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfData.inc (original)
+++ compiler-rt/trunk/lib/profile/InstrProfData.inc Thu Jul 21 23:08:16 2016
@@ -603,7 +603,8 @@ serializeValueProfDataFrom(ValueProfReco
#define VARIANT_MASKS_ALL 0xff00000000000000ULL
#define GET_VERSION(V) ((V) & ~VARIANT_MASKS_ALL)
#define VARIANT_MASK_IR_PROF (0x1ULL << 56)
-#define IR_LEVEL_PROF_VERSION_VAR __llvm_profile_raw_version
+#define INSTR_PROF_RAW_VERSION_VAR __llvm_profile_raw_version
+#define INSTR_PROF_PROFILE_RUNTIME_VAR __llvm_profile_runtime
/* The variable that holds the name of the profile data
* specified via command line. */
Modified: compiler-rt/trunk/lib/profile/InstrProfiling.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.c?rev=276385&r1=276384&r2=276385&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfiling.c Thu Jul 21 23:08:16 2016
@@ -18,7 +18,7 @@
COMPILER_RT_VISIBILITY char *(*GetEnvHook)(const char *) = 0;
-COMPILER_RT_WEAK uint64_t __llvm_profile_raw_version = INSTR_PROF_RAW_VERSION;
+COMPILER_RT_WEAK uint64_t INSTR_PROF_RAW_VERSION_VAR = INSTR_PROF_RAW_VERSION;
COMPILER_RT_WEAK char INSTR_PROF_PROFILE_NAME_VAR[1] = {0};
Modified: compiler-rt/trunk/lib/profile/InstrProfiling.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfiling.h?rev=276385&r1=276384&r2=276385&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfiling.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfiling.h Thu Jul 21 23:08:16 2016
@@ -162,8 +162,8 @@ uint64_t __llvm_profile_get_data_size(co
* Note that this variable's visibility needs to be hidden so that the
* definition of this variable in an instrumented shared library won't
* affect runtime initialization decision of the main program.
- */
-COMPILER_RT_VISIBILITY extern int __llvm_profile_runtime;
+ * __llvm_profile_profile_runtime. */
+COMPILER_RT_VISIBILITY extern int INSTR_PROF_PROFILE_RUNTIME_VAR;
/*!
* This variable is defined in InstrProfiling.c. Its main purpose is to
@@ -175,7 +175,7 @@ COMPILER_RT_VISIBILITY extern int __llvm
* main program are expected to be instrumented in the same way), there is
* no need for this variable to be hidden.
*/
-extern uint64_t __llvm_profile_raw_version;
+extern uint64_t INSTR_PROF_RAW_VERSION_VAR; /* __llvm_profile_raw_version */
/*!
* This variable is a weak symbol defined in InstrProfiling.c. It allows
Modified: compiler-rt/trunk/lib/profile/InstrProfilingRuntime.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingRuntime.cc?rev=276385&r1=276384&r2=276385&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingRuntime.cc (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingRuntime.cc Thu Jul 21 23:08:16 2016
@@ -11,7 +11,8 @@ extern "C" {
#include "InstrProfiling.h"
-COMPILER_RT_VISIBILITY int __llvm_profile_runtime;
+/* int __llvm_profile_runtime */
+COMPILER_RT_VISIBILITY int INSTR_PROF_PROFILE_RUNTIME_VAR;
}
namespace {
More information about the llvm-commits
mailing list