Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
authorTed Kremenek <kremenek@apple.com>
Wed, 4 May 2011 23:26:59 +0000 (23:26 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 4 May 2011 23:26:59 +0000 (23:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130885 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CrashRecoveryContext.h

index db835e8c20489dd0f33c910d42dd9f7cca0ecfb9..4c0a5e26f00f0e80fe7d043238eead8f79457cb8 100644 (file)
@@ -186,8 +186,13 @@ public:
   }
 
   ~CrashRecoveryContextCleanupRegistrar() {
+    unregister();
+  }
+  
+  void unregister() {
     if (cleanup && !cleanup->cleanupFired)
-        cleanup->getContext()->unregisterCleanup(cleanup);
+      cleanup->getContext()->unregisterCleanup(cleanup);
+    cleanup = 0;
   }
 };
 }