From 2169ad8c60c9d4fcc3665836be6c5f9302b1c4ec Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 4 May 2011 23:26:59 +0000 Subject: [PATCH] Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130885 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CrashRecoveryContext.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/llvm/Support/CrashRecoveryContext.h b/include/llvm/Support/CrashRecoveryContext.h index db835e8c204..4c0a5e26f00 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; } }; } -- 2.34.1