diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-05-04 23:26:59 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-05-04 23:26:59 +0000 |
commit | 2169ad8c60c9d4fcc3665836be6c5f9302b1c4ec (patch) | |
tree | c0f050193f142e17e85cdb16b22e9538796ca459 /include/llvm/Support/CrashRecoveryContext.h | |
parent | becfb889aaab4df3f91048b48353d0040beb4aa8 (diff) | |
download | external_llvm-2169ad8c60c9d4fcc3665836be6c5f9302b1c4ec.zip external_llvm-2169ad8c60c9d4fcc3665836be6c5f9302b1c4ec.tar.gz external_llvm-2169ad8c60c9d4fcc3665836be6c5f9302b1c4ec.tar.bz2 |
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CrashRecoveryContext.h')
-rw-r--r-- | include/llvm/Support/CrashRecoveryContext.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Support/CrashRecoveryContext.h b/include/llvm/Support/CrashRecoveryContext.h index db835e8..4c0a5e2 100644 --- a/include/llvm/Support/CrashRecoveryContext.h +++ b/include/llvm/Support/CrashRecoveryContext.h @@ -186,8 +186,13 @@ public: } ~CrashRecoveryContextCleanupRegistrar() { + unregister(); + } + + void unregister() { if (cleanup && !cleanup->cleanupFired) - cleanup->getContext()->unregisterCleanup(cleanup); + cleanup->getContext()->unregisterCleanup(cleanup); + cleanup = 0; } }; } |