diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-29 01:42:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-29 01:42:58 +0000 |
commit | b44fd24fc107e62155aa39d33ebbee45f05639c7 (patch) | |
tree | 91bc474a820ec9d5ceaf9963af6e35bf7c66080f /llvm/lib/MC/MCParser/AsmParser.cpp | |
parent | 3a7e8cd6bdba63c68e69148bbb86ac6fb7687d35 (diff) | |
download | bcm5719-llvm-b44fd24fc107e62155aa39d33ebbee45f05639c7.tar.gz bcm5719-llvm-b44fd24fc107e62155aa39d33ebbee45f05639c7.zip |
change the protocol TargetAsmPArser::MatchInstruction method to take an
MCStreamer to emit into instead of an MCInst to fill in. This allows the
matcher extra flexibility and is more convenient.
llvm-svn: 115014
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/AsmParser.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 7ffe2a46780..fbf952633ed 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -19,7 +19,6 @@ #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCInst.h" #include "llvm/MC/MCParser/AsmCond.h" #include "llvm/MC/MCParser/AsmLexer.h" #include "llvm/MC/MCParser/MCAsmParser.h" @@ -1047,14 +1046,9 @@ bool AsmParser::ParseStatement() { } // If parsing succeeded, match the instruction. - if (!HadError) { - MCInst Inst; - if (!getTargetParser().MatchInstruction(IDLoc, ParsedOperands, Inst)) { - // Emit the instruction on success. - Out.EmitInstruction(Inst); - } else - HadError = true; - } + if (!HadError) + HadError = getTargetParser().MatchAndEmitInstruction(IDLoc, ParsedOperands, + Out); // Free any parsed operands. for (unsigned i = 0, e = ParsedOperands.size(); i != e; ++i) |