summaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-08 05:10:46 +0000
committerChris Lattner <sabre@nondot.org>2010-09-08 05:10:46 +0000
commit34e53140c2cc02ce4c9d060e48302576d3962e1c (patch)
tree2935f144ee34b31941cc1ead2b3916111afb1a3f /lib/Target/ARM/AsmParser
parent9607c40601b345c21af9de97ec03e124179efd24 (diff)
downloadexternal_llvm-34e53140c2cc02ce4c9d060e48302576d3962e1c.zip
external_llvm-34e53140c2cc02ce4c9d060e48302576d3962e1c.tar.gz
external_llvm-34e53140c2cc02ce4c9d060e48302576d3962e1c.tar.bz2
change the MC "ParseInstruction" interface to make it the
implementation's job to check for and lex the EndOfStatement marker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmParser')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index f2099d2..f44470b 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -737,6 +737,11 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc,
Operands.push_back(Op.take());
}
}
+
+ if (getLexer().isNot(AsmToken::EndOfStatement))
+ return TokError("unexpected token in argument list");
+ Parser.Lex(); // Consume the EndOfStatement
+
return false;
}