@@ -658,7 +658,7 @@ class AsmParser : public MCAsmParser {
658658
659659 bool parseDirectiveComm (bool IsLocal); // ".comm" and ".lcomm"
660660
661- bool parseDirectiveAbort (); // ".abort"
661+ bool parseDirectiveAbort (SMLoc DirectiveLoc ); // ".abort"
662662 bool parseDirectiveInclude (); // ".include"
663663 bool parseDirectiveIncbin (); // ".incbin"
664664
@@ -2120,7 +2120,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info,
21202120 case DK_LCOMM:
21212121 return parseDirectiveComm (/* IsLocal=*/ true );
21222122 case DK_ABORT:
2123- return parseDirectiveAbort ();
2123+ return parseDirectiveAbort (IDLoc );
21242124 case DK_INCLUDE:
21252125 return parseDirectiveInclude ();
21262126 case DK_INCBIN:
@@ -5095,21 +5095,17 @@ bool AsmParser::parseDirectiveComm(bool IsLocal) {
50955095
50965096// / parseDirectiveAbort
50975097// / ::= .abort [... message ...]
5098- bool AsmParser::parseDirectiveAbort () {
5099- // FIXME: Use loc from directive.
5100- SMLoc Loc = getLexer ().getLoc ();
5101-
5098+ bool AsmParser::parseDirectiveAbort (SMLoc DirectiveLoc) {
51025099 StringRef Str = parseStringToEndOfStatement ();
51035100 if (parseEOL ())
51045101 return true ;
51055102
51065103 if (Str.empty ())
5107- return Error (Loc, " .abort detected. Assembly stopping." );
5108- else
5109- return Error (Loc, " .abort '" + Str + " ' detected. Assembly stopping." );
5110- // FIXME: Actually abort assembly here.
5104+ return Error (DirectiveLoc, " .abort detected. Assembly stopping" );
51115105
5112- return false ;
5106+ // FIXME: Actually abort assembly here.
5107+ return Error (DirectiveLoc,
5108+ " .abort '" + Str + " ' detected. Assembly stopping" );
51135109}
51145110
51155111// / parseDirectiveInclude
0 commit comments