[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
This commit is contained in:
Chad Rosier 2013-02-15 21:58:13 +00:00
parent b3dedc2ef2
commit 4fb25b7d79

View File

@ -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);
}