diff options
author | Russell Gallop <russell.gallop@sony.com> | 2019-12-16 15:01:22 +0000 |
---|---|---|
committer | Russell Gallop <russell.gallop@sony.com> | 2019-12-17 08:42:56 +0000 |
commit | 2bbcf156acc157377e814fbb1828a9fe89367ea2 (patch) | |
tree | bdcfd01f98983c421f0b75422e5ce368366887af /llvm/lib/Support/TimeProfiler.cpp | |
parent | ccfab8e4596e59c8eea6b3610cd163c5d0312193 (diff) | |
download | bcm5719-llvm-2bbcf156acc157377e814fbb1828a9fe89367ea2.tar.gz bcm5719-llvm-2bbcf156acc157377e814fbb1828a9fe89367ea2.zip |
[Support] Fix time trace multi threaded support with LLVM_ENABLE_THREADS=OFF
Following on from 8ddcd1dc26ba, which added the support. As pointed out
on D71059 this does not build on some systems with LLVM_ENABLE_THREADS=OFF.
Differential Revision: https://reviews.llvm.org/D71548
Diffstat (limited to 'llvm/lib/Support/TimeProfiler.cpp')
-rw-r--r-- | llvm/lib/Support/TimeProfiler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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; |