Tweak CrashRecoveryContextCleanup to provide an easy method for clients to select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant.
llvm-svn: 127929
diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp
index d4e21a3..e558662 100644
--- a/llvm/lib/Support/CrashRecoveryContext.cpp
+++ b/llvm/lib/Support/CrashRecoveryContext.cpp
@@ -65,6 +65,7 @@
while (i) {
CrashRecoveryContextCleanup *tmp = i;
i = tmp->next;
+ tmp->cleanupFired = true;
tmp->recoverResources();
delete tmp;
}