Skip to content

Commit 37d44bd

Browse files
committed
Add explicit 'unregister' method to CrashRecoveryConextCleanupRegistrar.
llvm-svn: 130885
1 parent dd55030 commit 37d44bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/include/llvm/Support/CrashRecoveryContext.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,13 @@ class CrashRecoveryContextCleanupRegistrar {
186186
}
187187

188188
~CrashRecoveryContextCleanupRegistrar() {
189+
unregister();
190+
}
191+
192+
void unregister() {
189193
if (cleanup && !cleanup->cleanupFired)
190-
cleanup->getContext()->unregisterCleanup(cleanup);
194+
cleanup->getContext()->unregisterCleanup(cleanup);
195+
cleanup = 0;
191196
}
192197
};
193198
}

0 commit comments

Comments
 (0)