diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-12 00:55:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-12 00:55:38 +0000 |
commit | f1e29d4c21d15f9e1e3a64f3b92b1aa9908e4f63 (patch) | |
tree | 2b8a2bbfa78f1c5e5eb6b2ae447bfeeb196538dc /lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
parent | 4f98f834593f0a107268d19a557b63f0da33a751 (diff) |
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/AsmParser/ARMAsmParser.cpp')
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 6932afbdb4..14592b0709 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 |