Changes in directory llvm/include/llvm/Support:
ManagedStatic.h updated: 1.3 -> 1.4 --- Log message: add a way to register an arbitrary cleanup function. --- Diffs of the changes: (+6 -0) ManagedStatic.h | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/include/llvm/Support/ManagedStatic.h diff -u llvm/include/llvm/Support/ManagedStatic.h:1.3 llvm/include/llvm/Support/ManagedStatic.h:1.4 --- llvm/include/llvm/Support/ManagedStatic.h:1.3 Sat Feb 10 13:54:24 2007 +++ llvm/include/llvm/Support/ManagedStatic.h Tue Feb 20 00:08:37 2007 @@ -73,6 +73,12 @@ } }; +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(); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits