projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ad2920
)
Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.
author
Kevin Enderby
<enderby@apple.com>
Wed, 16 Sep 2009 17:18:29 +0000
(17:18 +0000)
committer
Kevin Enderby
<enderby@apple.com>
Wed, 16 Sep 2009 17:18:29 +0000
(17:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82054
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/AsmParser/X86AsmParser.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/AsmParser/X86AsmParser.cpp
b/lib/Target/X86/AsmParser/X86AsmParser.cpp
index aa04ba60d37778192919893cb34a099c0043f674..c357b4d0dee1533c55a3a1cd4ba27e7123f8e8a7 100644
(file)
--- a/
lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/
lib/Target/X86/AsmParser/X86AsmParser.cpp
@@
-241,7
+241,8
@@
bool X86ATTAsmParser::ParseRegister(X86Operand &Op) {
getLexer().Lex(); // Eat percent token.
const AsmToken &Tok = getLexer().getTok();
- assert(TokPercent.is(AsmToken::Identifier) && "Invalid token kind!");
+ if (Tok.isNot(AsmToken::Identifier))
+ return Error(Tok.getLoc(), "invalid register name");
// FIXME: Validate register for the current architecture; we have to do
// validation later, so maybe there is no need for this here.