summaryrefslogtreecommitdiff
path: root/include/llvm/Support/ManagedStatic.h
diff options
context:
space:
mode:
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(); }
};