aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/CrashRecoveryContext.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-05-04 23:26:59 +0000
committerTed Kremenek <kremenek@apple.com>2011-05-04 23:26:59 +0000
commit2169ad8c60c9d4fcc3665836be6c5f9302b1c4ec (patch)
treec0f050193f142e17e85cdb16b22e9538796ca459 /include/llvm/Support/CrashRecoveryContext.h
parentbecfb889aaab4df3f91048b48353d0040beb4aa8 (diff)
downloadexternal_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.h7
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;
}
};
}