add a way to register an arbitrary cleanup function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34442 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-02-20 06:08:37 +00:00
parent eb41bddfdf
commit b4d7e35dde

View File

@ -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();