diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp --- a/clang/lib/Lex/Pragma.cpp +++ b/clang/lib/Lex/Pragma.cpp @@ -39,7 +39,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/ADT/StringRef.h" -#include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/ErrorHandling.h" #include @@ -1105,10 +1104,6 @@ M->dump(); } else if (II->isStr("overflow_stack")) { DebugOverflowStack(); - } else if (II->isStr("handle_crash")) { - llvm::CrashRecoveryContext *CRC =llvm::CrashRecoveryContext::GetCurrent(); - if (CRC) - CRC->HandleCrash(); } else if (II->isStr("captured")) { HandleCaptured(PP); } else { diff --git a/llvm/include/llvm/Support/CrashRecoveryContext.h b/llvm/include/llvm/Support/CrashRecoveryContext.h --- a/llvm/include/llvm/Support/CrashRecoveryContext.h +++ b/llvm/include/llvm/Support/CrashRecoveryContext.h @@ -97,10 +97,6 @@ return RunSafelyOnThread([&]() { Fn(UserData); }, RequestedStackSize); } - /// Explicitly trigger a crash recovery in the current process, and - /// return failure from RunSafely(). This function does not return. - void HandleCrash(); - /// In case of a crash, this is the crash identifier. int RetCode = 0; diff --git a/llvm/lib/Support/CrashRecoveryContext.cpp b/llvm/lib/Support/CrashRecoveryContext.cpp --- a/llvm/lib/Support/CrashRecoveryContext.cpp +++ b/llvm/lib/Support/CrashRecoveryContext.cpp @@ -406,14 +406,6 @@ #endif // !_MSC_VER -void CrashRecoveryContext::HandleCrash() { - CrashRecoveryContextImpl *CRCI = (CrashRecoveryContextImpl *) Impl; - assert(CRCI && "Crash recovery context never initialized!"); - // As per convention, -2 indicates a crash or timeout as opposed to failure to - // execute (see llvm/include/llvm/Support/Program.h) - CRCI->HandleCrash(-2, 0); -} - // FIXME: Portability. static void setThreadBackgroundPriority() { #ifdef __APPLE__