diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-07-18 18:31:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-07-18 18:31:33 +0000 |
commit | 9fbb37e10d3b2814877bb8d2893d863fe1da660b (patch) | |
tree | 04a9385919b34f9be3c6bce9ef56688775e597e2 /tools/edis | |
parent | 346cc61cd20c41ef15ed824d28c81f40f1b28590 (diff) |
MC: Move several clients to using AsmParser constructor function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/edis')
-rw-r--r-- | tools/edis/EDDisassembler.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/edis/EDDisassembler.cpp b/tools/edis/EDDisassembler.cpp index 85e41e61af..5a59e34f57 100644 --- a/tools/edis/EDDisassembler.cpp +++ b/tools/edis/EDDisassembler.cpp @@ -27,7 +27,6 @@ #include "llvm/MC/MCInstPrinter.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCParser/AsmLexer.h" -#include "llvm/MC/MCParser/AsmParser.h" #include "llvm/MC/MCParser/MCAsmParser.h" #include "llvm/MC/MCParser/MCParsedAsmOperand.h" #include "llvm/Support/MemoryBuffer.h" @@ -364,11 +363,13 @@ int EDDisassembler::parseInst(SmallVectorImpl<MCParsedAsmOperand*> &operands, sourceMgr.AddNewSourceBuffer(buf, SMLoc()); // ownership of buf handed over MCContext context(*AsmInfo); OwningPtr<MCStreamer> streamer(createNullStreamer(context)); - AsmParser genericParser(*Tgt, sourceMgr, context, *streamer, *AsmInfo); - OwningPtr<TargetAsmParser> TargetParser(Tgt->createAsmParser(genericParser)); + OwningPtr<MCAsmParser> genericParser(createMCAsmParser(*Tgt, sourceMgr, + context, *streamer, + *AsmInfo)); + OwningPtr<TargetAsmParser> TargetParser(Tgt->createAsmParser(*genericParser)); - AsmToken OpcodeToken = genericParser.Lex(); - AsmToken NextToken = genericParser.Lex(); // consume next token, because specificParser expects us to + AsmToken OpcodeToken = genericParser->Lex(); + AsmToken NextToken = genericParser->Lex(); // consume next token, because specificParser expects us to if (OpcodeToken.is(AsmToken::Identifier)) { instName = OpcodeToken.getString(); |