diff options
Diffstat (limited to 'include/llvm/Support/ManagedStatic.h')
-rw-r--r-- | include/llvm/Support/ManagedStatic.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/ManagedStatic.h b/include/llvm/Support/ManagedStatic.h index a9e7e96b5d..e65fb1b646 100644 --- 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(); |