From 79add417b44a5e793adf1375e9968ded2972b028 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Wed, 8 Feb 2017 14:02:16 +0000 Subject: Revert "[Assembler] Enable nicer diagnostics for inline assembly." This reverts commit r294433 because it seems it broke the buildbots. llvm-svn: 294448 --- llvm/lib/MC/MCContext.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'llvm/lib/MC/MCContext.cpp') diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 2bfd8e55cad..16c2c99be67 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -521,15 +521,13 @@ CodeViewContext &MCContext::getCVContext() { void MCContext::reportError(SMLoc Loc, const Twine &Msg) { HadError = true; - // If we have a source manager use it. Otherwise, try using the inline source - // manager. - // If that fails, use the generic report_fatal_error(). - if (SrcMgr) - SrcMgr->PrintMessage(Loc, SourceMgr::DK_Error, Msg); - else if (InlineSrcMgr) - InlineSrcMgr->PrintMessage(Loc, SourceMgr::DK_Error, Msg); - else + // If we have a source manager use it. Otherwise just use the generic + // report_fatal_error(). + if (!SrcMgr) report_fatal_error(Msg, false); + + // Use the source manager to print the message. + SrcMgr->PrintMessage(Loc, SourceMgr::DK_Error, Msg); } void MCContext::reportFatalError(SMLoc Loc, const Twine &Msg) { -- cgit v1.2.3