aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/TimeProfiler.cpp
diff options
context:
space:
mode:
authorRussell Gallop <russell.gallop@sony.com>2019-12-17 08:59:05 +0000
committerRussell Gallop <russell.gallop@sony.com>2019-12-17 08:59:05 +0000
commit531c71118f2910edcdc7b215dbb4ee429c623631 (patch)
treee36b802d3c4771461831bb78c1fbc5de70bb22df /llvm/lib/Support/TimeProfiler.cpp
parent2bbcf156acc157377e814fbb1828a9fe89367ea2 (diff)
downloadllvm-531c71118f2910edcdc7b215dbb4ee429c623631.zip
llvm-531c71118f2910edcdc7b215dbb4ee429c623631.tar.gz
llvm-531c71118f2910edcdc7b215dbb4ee429c623631.tar.bz2
Revert "[Support] Fix time trace multi threaded support with LLVM_ENABLE_THREADS=OFF"
This reverts commit 2bbcf156acc157377e814fbb1828a9fe89367ea2. This was failing on systems which use __thread such as http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/30851
Diffstat (limited to 'llvm/lib/Support/TimeProfiler.cpp')
-rw-r--r--llvm/lib/Support/TimeProfiler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/TimeProfiler.cpp b/llvm/lib/Support/TimeProfiler.cpp
index ec01c6f..4709122 100644
--- a/llvm/lib/Support/TimeProfiler.cpp
+++ b/llvm/lib/Support/TimeProfiler.cpp
@@ -33,7 +33,8 @@ std::vector<std::unique_ptr<llvm::TimeTraceProfiler>>
namespace llvm {
-LLVM_THREAD_LOCAL std::unique_ptr<TimeTraceProfiler> TimeTraceProfilerInstance;
+thread_local std::unique_ptr<TimeTraceProfiler> TimeTraceProfilerInstance =
+ nullptr;
typedef duration<steady_clock::rep, steady_clock::period> DurationType;
typedef time_point<steady_clock> TimePointType;