aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-12 00:55:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-12 00:55:38 +0000
commit2ae71c9eabb91083ac98f49da2e3a4561a5b219c (patch)
tree2b8a2bbfa78f1c5e5eb6b2ae447bfeeb196538dc /lib/Target/ARM
parent049a7528a0bbafcc9c7ef844cea64d27dbc95f98 (diff)
downloadexternal_llvm-2ae71c9eabb91083ac98f49da2e3a4561a5b219c.zip
external_llvm-2ae71c9eabb91083ac98f49da2e3a4561a5b219c.tar.gz
external_llvm-2ae71c9eabb91083ac98f49da2e3a4561a5b219c.tar.bz2
MC/AsmParser: Push the burdon of emitting diagnostics about unmatched
instructions onto the target specific parser, which can do a better job. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110889 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 6932afb..14592b0 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -80,9 +80,16 @@ private:
bool ParseDirectiveSyntax(SMLoc L);
- bool MatchInstruction(const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
+ bool MatchInstruction(SMLoc IDLoc,
+ const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
MCInst &Inst) {
- return MatchInstructionImpl(Operands, Inst);
+ if (!MatchInstructionImpl(Operands, Inst))
+ return false;
+
+ // FIXME: We should give nicer diagnostics about the exact failure.
+ Error(IDLoc, "unrecognized instruction");
+
+ return true;
}
/// @name Auto-generated Match Functions