[profile] add runtime variable documentation

llvm-svn: 269964
diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h
index 9c7f03b..d474b46 100644
--- a/compiler-rt/lib/profile/InstrProfiling.h
+++ b/compiler-rt/lib/profile/InstrProfiling.h
@@ -154,4 +154,33 @@
 uint64_t __llvm_profile_get_data_size(const __llvm_profile_data *Begin,
                                       const __llvm_profile_data *End);
 
+/*!
+ * This variable is defined in InstrProfilingRuntime.c as a hidden
+ * symbol. Its main purpose is to enable profile runtime user to
+ * bypass runtime initialization code -- if the client code explicitly
+ * define this variable, then InstProfileRuntime.o won't be linked in.
+ * 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;
+/*! 
+ * This variable is defined in InstrProfilingFile.c. Its visibility is
+ * not hidden so that instrumented shared libraries and the main program
+ * can share the raw data file with the same name.
+ */
+extern int __llvm_profile_OwnsFilename;
+extern const char *__llvm_profile_CurrentFilename;
+/*!
+ * This variable is defined in InstrProfiling.c. Its main purpose is to
+ * encode the raw profile version value and other format related information
+ * such as whether the profile is from IR based instrumentation. The variable
+ * is defined as weak so that compiler can emit an overriding definition
+ * depending on user option.  Since we don't support mixing FE and IR based
+ * data in the same raw profile data file (in other words, shared libs and
+ * main program are expected to be instrumented in the same way), there is
+ * no need for this variale to be hidden.
+ */
+extern uint64_t __llvm_profile_raw_version;
+
 #endif /* PROFILE_INSTRPROFILING_H_ */