Index: llvm/include/llvm/Support/TimeProfiler.h =================================================================== --- llvm/include/llvm/Support/TimeProfiler.h +++ llvm/include/llvm/Support/TimeProfiler.h @@ -14,7 +14,7 @@ namespace llvm { struct TimeTraceProfiler; -extern thread_local std::unique_ptr +extern LLVM_THREAD_LOCAL std::unique_ptr TimeTraceProfilerInstance; /// Initialize the time trace profiler. Index: llvm/lib/Support/TimeProfiler.cpp =================================================================== --- llvm/lib/Support/TimeProfiler.cpp +++ llvm/lib/Support/TimeProfiler.cpp @@ -33,8 +33,7 @@ namespace llvm { -thread_local std::unique_ptr TimeTraceProfilerInstance = - nullptr; +LLVM_THREAD_LOCAL std::unique_ptr TimeTraceProfilerInstance; typedef duration DurationType; typedef time_point TimePointType;