[llvm-commits] [llvm] r148459 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Jim Grosbach grosbach at apple.com
Wed Jan 18 18:47:30 PST 2012


Author: grosbach
Date: Wed Jan 18 20:47:30 2012
New Revision: 148459

URL: http://llvm.org/viewvc/llvm-project?rev=148459&view=rev
Log:
ARM assembly diagnostic caret in better position for FPImm.

Modified:
    llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=148459&r1=148458&r2=148459&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Wed Jan 18 20:47:30 2012
@@ -4277,6 +4277,7 @@
     Parser.Lex();
   }
   const AsmToken &Tok = Parser.getTok();
+  SMLoc Loc = Tok.getLoc();
   if (Tok.is(AsmToken::Real)) {
     APFloat RealVal(APFloat::IEEEdouble, Tok.getString());
     uint64_t IntVal = RealVal.bitcastToAPInt().getZExtValue();
@@ -4285,7 +4286,7 @@
     int Val = ARM_AM::getFP64Imm(APInt(64, IntVal));
     Parser.Lex(); // Eat the token.
     if (Val == -1) {
-      TokError("floating point value out of range");
+      Error(Loc, "floating point value out of range");
       return MatchOperand_ParseFail;
     }
     Operands.push_back(ARMOperand::CreateFPImm(Val, S, getContext()));
@@ -4295,14 +4296,14 @@
     int64_t Val = Tok.getIntVal();
     Parser.Lex(); // Eat the token.
     if (Val > 255 || Val < 0) {
-      TokError("encoded floating point value out of range");
+      Error(Loc, "encoded floating point value out of range");
       return MatchOperand_ParseFail;
     }
     Operands.push_back(ARMOperand::CreateFPImm(Val, S, getContext()));
     return MatchOperand_Success;
   }
 
-  TokError("invalid floating point immediate");
+  Error(Loc, "invalid floating point immediate");
   return MatchOperand_ParseFail;
 }
 /// Parse a arm instruction operand.  For now this parses the operand regardless





More information about the llvm-commits mailing list