summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-29 01:42:58 +0000
committerChris Lattner <sabre@nondot.org>2010-09-29 01:42:58 +0000
commitb44fd24fc107e62155aa39d33ebbee45f05639c7 (patch)
tree91bc474a820ec9d5ceaf9963af6e35bf7c66080f /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
parent3a7e8cd6bdba63c68e69148bbb86ac6fb7687d35 (diff)
downloadbcm5719-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/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 62712fc5be5..6eb564bc562 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -80,16 +80,18 @@ private:
bool ParseDirectiveSyntax(SMLoc L);
- bool MatchInstruction(SMLoc IDLoc,
+ bool MatchAndEmitInstruction(SMLoc IDLoc,
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
- MCInst &Inst) {
+ MCStreamer &Out) {
+ MCInst Inst;
unsigned ErrorInfo;
- if (MatchInstructionImpl(Operands, Inst, ErrorInfo) == Match_Success)
+ if (MatchInstructionImpl(Operands, Inst, ErrorInfo) == Match_Success) {
+ Out.EmitInstruction(Inst);
return false;
+ }
// FIXME: We should give nicer diagnostics about the exact failure.
Error(IDLoc, "unrecognized instruction");
-
return true;
}
OpenPOWER on IntegriCloud