@@ -154,4 +154,33 @@ uint64_t __llvm_profile_get_version(void);
154
154
uint64_t __llvm_profile_get_data_size (const __llvm_profile_data * Begin ,
155
155
const __llvm_profile_data * End );
156
156
157
+ /*!
158
+ * This variable is defined in InstrProfilingRuntime.c as a hidden
159
+ * symbol. Its main purpose is to enable profile runtime user to
160
+ * bypass runtime initialization code -- if the client code explicitly
161
+ * define this variable, then InstProfileRuntime.o won't be linked in.
162
+ * Note that this variable's visibility needs to be hidden so that the
163
+ * definition of this variable in an instrumented shared library won't
164
+ * affect runtime initialization decision of the main program.
165
+ */
166
+ COMPILER_RT_VISIBILITY extern int __llvm_profile_runtime ;
167
+ /*!
168
+ * This variable is defined in InstrProfilingFile.c. Its visibility is
169
+ * not hidden so that instrumented shared libraries and the main program
170
+ * can share the raw data file with the same name.
171
+ */
172
+ extern int __llvm_profile_OwnsFilename ;
173
+ extern const char * __llvm_profile_CurrentFilename ;
174
+ /*!
175
+ * This variable is defined in InstrProfiling.c. Its main purpose is to
176
+ * encode the raw profile version value and other format related information
177
+ * such as whether the profile is from IR based instrumentation. The variable
178
+ * is defined as weak so that compiler can emit an overriding definition
179
+ * depending on user option. Since we don't support mixing FE and IR based
180
+ * data in the same raw profile data file (in other words, shared libs and
181
+ * main program are expected to be instrumented in the same way), there is
182
+ * no need for this variale to be hidden.
183
+ */
184
+ extern uint64_t __llvm_profile_raw_version ;
185
+
157
186
#endif /* PROFILE_INSTRPROFILING_H_ */
0 commit comments