CrashRecovery since it avoids sending a signal which may be intercepted by the
debugger.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111449
91177308-0d34-0410-b5e6-
96231b3b80d8
#include "clang/Lex/LexDiagnostic.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
+#include "llvm/Support/CrashRecoveryContext.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
using namespace clang;
llvm_unreachable("#pragma clang __debug llvm_unreachable");
} else if (II->isStr("overflow_stack")) {
DebugOverflowStack();
+ } else if (II->isStr("handle_crash")) {
+ llvm::CrashRecoveryContext *CRC =llvm::CrashRecoveryContext::GetCurrent();
+ if (CRC)
+ CRC->HandleCrash();
} else {
PP.Diag(Tok, diag::warn_pragma_debug_unexpected_command)
<< II->getName();