@@ -658,7 +658,7 @@ class AsmParser : public MCAsmParser {
658
658
659
659
bool parseDirectiveComm (bool IsLocal); // ".comm" and ".lcomm"
660
660
661
- bool parseDirectiveAbort (); // ".abort"
661
+ bool parseDirectiveAbort (SMLoc DirectiveLoc ); // ".abort"
662
662
bool parseDirectiveInclude (); // ".include"
663
663
bool parseDirectiveIncbin (); // ".incbin"
664
664
@@ -2120,7 +2120,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info,
2120
2120
case DK_LCOMM:
2121
2121
return parseDirectiveComm (/* IsLocal=*/ true );
2122
2122
case DK_ABORT:
2123
- return parseDirectiveAbort ();
2123
+ return parseDirectiveAbort (IDLoc );
2124
2124
case DK_INCLUDE:
2125
2125
return parseDirectiveInclude ();
2126
2126
case DK_INCBIN:
@@ -5095,21 +5095,17 @@ bool AsmParser::parseDirectiveComm(bool IsLocal) {
5095
5095
5096
5096
// / parseDirectiveAbort
5097
5097
// / ::= .abort [... message ...]
5098
- bool AsmParser::parseDirectiveAbort () {
5099
- // FIXME: Use loc from directive.
5100
- SMLoc Loc = getLexer ().getLoc ();
5101
-
5098
+ bool AsmParser::parseDirectiveAbort (SMLoc DirectiveLoc) {
5102
5099
StringRef Str = parseStringToEndOfStatement ();
5103
5100
if (parseEOL ())
5104
5101
return true ;
5105
5102
5106
5103
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" );
5111
5105
5112
- return false ;
5106
+ // FIXME: Actually abort assembly here.
5107
+ return Error (DirectiveLoc,
5108
+ " .abort '" + Str + " ' detected. Assembly stopping" );
5113
5109
}
5114
5110
5115
5111
// / parseDirectiveInclude
0 commit comments