@@ -78,19 +78,19 @@ using namespace Intel::OpenCL::ClangFE;
78
78
79
79
llvm::ManagedStatic<llvm::sys::SmartMutex<true >> compileMutex;
80
80
81
- void CommonClangTerminate () { llvm::llvm_shutdown (); }
81
+ void OpenCLClangTerminate () { llvm::llvm_shutdown (); }
82
82
83
83
// This function mustn't be invoked from a static object constructor,
84
84
// from a DllMain function (Windows specific), or from a function
85
85
// w\ __attribute__ ((constructor)) (Linux specific).
86
- void CommonClangInitialize () {
87
- // CommonClangTerminate calls llvm_shutdown to deallocate resources used
86
+ void OpenCLClangInitialize () {
87
+ // OpenCLClangTerminate calls llvm_shutdown to deallocate resources used
88
88
// by LLVM libraries. llvm_shutdown uses static mutex to make it safe for
89
89
// multi-threaded envirounment and LLVM libraries user is expected call
90
90
// llvm_shutdown before static object are destroyed, so we use atexit to
91
91
// satisfy this requirement.
92
92
llvm::once_flag OnceFlag;
93
- llvm::call_once (OnceFlag, []() { atexit (CommonClangTerminate ); });
93
+ llvm::call_once (OnceFlag, []() { atexit (OpenCLClangTerminate ); });
94
94
}
95
95
96
96
static bool GetHeaders (std::vector<Resource> &Result) {
@@ -190,7 +190,7 @@ Compile(const char *pszProgramSource, const char **pInputHeaders,
190
190
PrintCompileOptions (pszOptions, pszOptionsEx, pszOpenCLVer, pszProgramSource);
191
191
192
192
// Lazy initialization
193
- CommonClangInitialize ();
193
+ OpenCLClangInitialize ();
194
194
195
195
try {
196
196
#ifdef _WIN32
0 commit comments