From: Chad Rosier Date: Fri, 19 Apr 2013 17:31:39 +0000 (+0000) Subject: [ms-inline asm] Make this a hard error. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fea1f8ee7a707c1a37a69f92459046ede590d834;p=oota-llvm.git [ms-inline asm] Make this a hard error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179865 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp index 4418a3c5e22..2fbfe269708 100644 --- a/lib/Target/X86/AsmParser/X86AsmParser.cpp +++ b/lib/Target/X86/AsmParser/X86AsmParser.cpp @@ -1404,10 +1404,10 @@ X86Operand *X86AsmParser::ParseIntelMemOperand(unsigned SegReg, unsigned Size = getIntelMemOperandSize(Tok.getString()); if (Size) { - Parser.Lex(); - assert ((Tok.getString() == "PTR" || Tok.getString() == "ptr") && - "Unexpected token!"); - Parser.Lex(); + Parser.Lex(); // Eat operand size (e.g., byte, word). + if (Tok.getString() != "PTR" && Tok.getString() != "ptr") + return ErrorOperand(Start, "Expected 'PTR' or 'ptr' token!"); + Parser.Lex(); // Eat ptr. } // Parse ImmDisp [ BaseReg + Scale*IndexReg + Disp ].