[MC] Remove MCContext::reportFatalError

As the 10-year-old FIXME comment says, this API is not recommended.
This commit is contained in:
Fangrui Song 2022-01-15 00:42:42 -08:00
parent 8123e2ed74
commit 59d04ce639
2 changed files with 0 additions and 14 deletions

View File

@ -814,10 +814,6 @@ namespace llvm {
void diagnose(const SMDiagnostic &SMD);
void reportError(SMLoc L, const Twine &Msg);
void reportWarning(SMLoc L, const Twine &Msg);
// Unrecoverable error has occurred. Display the best diagnostic we can
// and bail via exit(1). For now, most MC backend errors are unrecoverable.
// FIXME: We should really do something about that.
[[noreturn]] void reportFatalError(SMLoc L, const Twine &Msg);
const MCAsmMacro *lookupMacro(StringRef Name) {
StringMap<MCAsmMacro>::iterator I = MacroMap.find(Name);

View File

@ -978,13 +978,3 @@ void MCContext::reportWarning(SMLoc Loc, const Twine &Msg) {
});
}
}
void MCContext::reportFatalError(SMLoc Loc, const Twine &Msg) {
reportError(Loc, Msg);
// If we reached here, we are failing ungracefully. Run the interrupt handlers
// to make sure any special cleanups get done, in particular that we remove
// files registered with RemoveFileOnSignal.
sys::RunInterruptHandlers();
exit(1);
}