projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bfc69c
)
add a helper to call llvm_shutdown()
author
Chris Lattner
<sabre@nondot.org>
Wed, 6 Dec 2006 01:01:14 +0000
(
01:01
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 6 Dec 2006 01:01:14 +0000
(
01:01
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32249
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/ManagedStatic.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/ManagedStatic.h
b/include/llvm/Support/ManagedStatic.h
index 7753105f7e61882bdbb95400e86f9663f47d94f7..e1585bafa80d28fc4083ea679656cd8311d80e64 100644
(file)
--- a/
include/llvm/Support/ManagedStatic.h
+++ b/
include/llvm/Support/ManagedStatic.h
@@
-74,6
+74,14
@@
public:
/// llvm_shutdown - Deallocate and destroy all ManagedStatic variables.
void llvm_shutdown();
+
+/// llvm_shutdown_obj - This is a simple helper class that calls
+/// llvm_shutdown() when it is destroyed.
+struct llvm_shutdown_obj {
+ llvm_shutdown_obj() {}
+ ~llvm_shutdown_obj() { llvm_shutdown(); }
+};
+
}
#endif