summaryrefslogtreecommitdiff
path: root/include/llvm/Support/ManagedStatic.h
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-06-24 13:36:31 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-06-24 13:36:31 +0000
commitcdde33ebaad211e1ce0fc22b53bbccff8bb3c1a4 (patch)
tree95d91245366b3a7cc446072a43fd365ba07f7da1 /include/llvm/Support/ManagedStatic.h
parent90be077d09df2f577448105c6dfd6ef78c4e6b6f (diff)
downloadllvm-cdde33ebaad211e1ce0fc22b53bbccff8bb3c1a4.tar.gz
llvm-cdde33ebaad211e1ce0fc22b53bbccff8bb3c1a4.tar.bz2
llvm-cdde33ebaad211e1ce0fc22b53bbccff8bb3c1a4.tar.xz
Revert r211287, "Remove support for LLVM runtime multi-threading."
libclang still requires it on cygming, lack of incomplete <mutex>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ManagedStatic.h')
-rw-r--r--include/llvm/Support/ManagedStatic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/ManagedStatic.h b/include/llvm/Support/ManagedStatic.h
index d8fbfeb8e2..1bb8cea092 100644
--- a/include/llvm/Support/ManagedStatic.h
+++ b/include/llvm/Support/ManagedStatic.h
@@ -103,6 +103,9 @@ void llvm_shutdown();
/// llvm_shutdown() when it is destroyed.
struct llvm_shutdown_obj {
llvm_shutdown_obj() { }
+ explicit llvm_shutdown_obj(bool multithreaded) {
+ if (multithreaded) llvm_start_multithreaded();
+ }
~llvm_shutdown_obj() { llvm_shutdown(); }
};