summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/TimeProfiler.h2
-rw-r--r--llvm/lib/Support/TimeProfiler.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/TimeProfiler.h b/llvm/include/llvm/Support/TimeProfiler.h
index f43893a6d93..b2045424262 100644
--- a/llvm/include/llvm/Support/TimeProfiler.h
+++ b/llvm/include/llvm/Support/TimeProfiler.h
@@ -14,7 +14,7 @@
namespace llvm {
struct TimeTraceProfiler;
-extern thread_local std::unique_ptr<TimeTraceProfiler>
+extern LLVM_THREAD_LOCAL std::unique_ptr<TimeTraceProfiler>
TimeTraceProfilerInstance;
/// Initialize the time trace profiler.
diff --git a/llvm/lib/Support/TimeProfiler.cpp b/llvm/lib/Support/TimeProfiler.cpp
index 47091221a78..ec01c6f2f7e 100644
--- a/llvm/lib/Support/TimeProfiler.cpp
+++ b/llvm/lib/Support/TimeProfiler.cpp
@@ -33,8 +33,7 @@ std::vector<std::unique_ptr<llvm::TimeTraceProfiler>>
namespace llvm {
-thread_local std::unique_ptr<TimeTraceProfiler> TimeTraceProfilerInstance =
- nullptr;
+LLVM_THREAD_LOCAL std::unique_ptr<TimeTraceProfiler> TimeTraceProfilerInstance;
typedef duration<steady_clock::rep, steady_clock::period> DurationType;
typedef time_point<steady_clock> TimePointType;
OpenPOWER on IntegriCloud