[llvm-commits] [llvm] r130885 - /llvm/trunk/include/llvm/Support/CrashRecoveryContext.h

Ted Kremenek kremenek at apple.com
Wed May 4 16:26:59 PDT 2011


Author: kremenek
Date: Wed May  4 18:26:59 2011
New Revision: 130885

URL: http://llvm.org/viewvc/llvm-project?rev=130885&view=rev
Log:
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.

Modified:
    llvm/trunk/include/llvm/Support/CrashRecoveryContext.h

Modified: llvm/trunk/include/llvm/Support/CrashRecoveryContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CrashRecoveryContext.h?rev=130885&r1=130884&r2=130885&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CrashRecoveryContext.h (original)
+++ llvm/trunk/include/llvm/Support/CrashRecoveryContext.h Wed May  4 18:26:59 2011
@@ -186,8 +186,13 @@
   }
 
   ~CrashRecoveryContextCleanupRegistrar() {
+    unregister();
+  }
+  
+  void unregister() {
     if (cleanup && !cleanup->cleanupFired)
-        cleanup->getContext()->unregisterCleanup(cleanup);
+      cleanup->getContext()->unregisterCleanup(cleanup);
+    cleanup = 0;
   }
 };
 }





More information about the llvm-commits mailing list