mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
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:
parent
eb41bddfdf
commit
b4d7e35dde
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user