From: Chad Rosier Date: Fri, 15 Feb 2013 21:58:13 +0000 (+0000) Subject: [ms-inline asm] Adjust the EndLoc to account for the ']'. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4fb25b7d799ea27a2c98a4d9bcf7469cc685db47;p=oota-llvm.git [ms-inline asm] Adjust the EndLoc to account for the ']'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175312 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index dc15a115370..8c4c447df90 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -911,7 +911,8 @@ X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned SegReg, 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); }