OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb41bdd
)
add a way to register an arbitrary cleanup function.
author
Chris Lattner
<sabre@nondot.org>
Tue, 20 Feb 2007 06:08:37 +0000
(06:08 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 20 Feb 2007 06:08:37 +0000
(06:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34442
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
a9e7e96
..
e65fb1b
100644
(file)
--- a/
include/llvm/Support/ManagedStatic.h
+++ b/
include/llvm/Support/ManagedStatic.h
@@
-73,6
+73,12
@@
public:
}
};
+template<void (*CleanupFn)(void*)>
+class ManagedCleanup : public ManagedStaticBase {
+public:
+ void Register() { RegisterManagedStatic(0, CleanupFn); }
+};
+
/// llvm_shutdown - Deallocate and destroy all ManagedStatic variables.
void llvm_shutdown();