aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-04-19 17:31:39 +0000
committerChad Rosier <mcrosier@apple.com>2013-04-19 17:31:39 +0000
commitfea1f8ee7a707c1a37a69f92459046ede590d834 (patch)
treefb46ee4e8af516a90d5d25b6dc20d1c24eade568 /lib/Target/X86
parenteb733d2a1b8683f5cb3558160cb03a442f46e46e (diff)
[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
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/AsmParser/X86AsmParser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/X86/AsmParser/X86AsmParser.cpp b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index 4418a3c5e2..2fbfe26970 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 ].