[ms-inline asm] Offset operator - the size should be based on the size of a

pointer, not the size of the variable.
Part of rdar://12470317



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166526 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier 2012-10-23 23:42:06 +00:00
parent d4d96acb91
commit a6cf7a62a7

View File

@ -774,6 +774,10 @@ X86Operand *X86AsmParser::ParseIntelMemOperand(unsigned SegReg, SMLoc Start) {
Tok.getString() == "OFFSET")) {
OffsetOf = true;
OffsetOfLoc = Parser.getTok().getLoc();
// Size is based on the size of a pointer, not the size of the variable.
assert (!Size && "Unexpected size!");
Size = is64BitMode() ? 64 : 32;
Parser.Lex(); // Eat offset.
}