[llvm] r175312 - [ms-inline asm] Adjust the EndLoc to account for the ']'.

Chad Rosier mcrosier at apple.com
Fri Feb 15 13:58:14 PST 2013


Author: mcrosier
Date: Fri Feb 15 15:58:13 2013
New Revision: 175312

URL: http://llvm.org/viewvc/llvm-project?rev=175312&view=rev
Log:
[ms-inline asm] Adjust the EndLoc to account for the ']'.

Modified:
    llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp

Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=175312&r1=175311&r2=175312&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Fri Feb 15 15:58:13 2013
@@ -911,7 +911,8 @@ X86Operand *X86AsmParser::ParseIntelBrac
 
       if (getLexer().isNot(AsmToken::RBrac))
         return ErrorOperand(Parser.getTok().getLoc(), "Expected ']' token!");
-      End = Parser.getTok().getEndLoc();
+      // Adjust the EndLoc due to the ']'.
+      End = SMLoc::getFromPointer(Parser.getTok().getEndLoc().getPointer()-1);
       Parser.Lex();
       return X86Operand::CreateMem(Disp, Start, End, Size);
     }





More information about the llvm-commits mailing list