[llvm] [MC,ELF] Use loc from the directive for `.abort` (PR #99648)

Dmitriy Chestnykh via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 02:10:40 PDT 2024


================
@@ -5095,21 +5095,16 @@ bool AsmParser::parseDirectiveComm(bool IsLocal) {
 
 /// parseDirectiveAbort
 ///  ::= .abort [... message ...]
-bool AsmParser::parseDirectiveAbort() {
-  // FIXME: Use loc from directive.
-  SMLoc Loc = getLexer().getLoc();
-
+bool AsmParser::parseDirectiveAbort(SMLoc DirectiveLoc) {
   StringRef Str = parseStringToEndOfStatement();
   if (parseEOL())
     return true;
 
   if (Str.empty())
-    return Error(Loc, ".abort detected. Assembly stopping.");
-  else
-    return Error(Loc, ".abort '" + Str + "' detected. Assembly stopping.");
-  // FIXME: Actually abort assembly here.
----------------
chestnykh wrote:

Done

https://github.com/llvm/llvm-project/pull/99648


More information about the llvm-commits mailing list