aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-mc
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-18 18:31:33 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-18 18:31:33 +0000
commit9fbb37e10d3b2814877bb8d2893d863fe1da660b (patch)
tree04a9385919b34f9be3c6bce9ef56688775e597e2 /tools/llvm-mc
parent346cc61cd20c41ef15ed824d28c81f40f1b28590 (diff)
downloadexternal_llvm-9fbb37e10d3b2814877bb8d2893d863fe1da660b.zip
external_llvm-9fbb37e10d3b2814877bb8d2893d863fe1da660b.tar.gz
external_llvm-9fbb37e10d3b2814877bb8d2893d863fe1da660b.tar.bz2
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/llvm-mc')
-rw-r--r--tools/llvm-mc/llvm-mc.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp
index 34cf8ce..ffa4914 100644
--- a/tools/llvm-mc/llvm-mc.cpp
+++ b/tools/llvm-mc/llvm-mc.cpp
@@ -12,13 +12,13 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/MC/MCParser/AsmLexer.h"
#include "llvm/MC/MCParser/MCAsmLexer.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCStreamer.h"
-#include "llvm/MC/MCParser/AsmParser.h"
#include "llvm/Target/TargetAsmBackend.h"
#include "llvm/Target/TargetAsmParser.h"
#include "llvm/Target/TargetData.h"
@@ -312,17 +312,18 @@ static int AssembleInput(const char *ProgName) {
Str.reset(createLoggingStreamer(Str.take(), errs()));
}
- AsmParser Parser(*TheTarget, SrcMgr, Ctx, *Str.get(), *MAI);
- OwningPtr<TargetAsmParser> TAP(TheTarget->createAsmParser(Parser));
+ OwningPtr<MCAsmParser> Parser(createMCAsmParser(*TheTarget, SrcMgr, Ctx,
+ *Str.get(), *MAI));
+ OwningPtr<TargetAsmParser> TAP(TheTarget->createAsmParser(*Parser));
if (!TAP) {
errs() << ProgName
<< ": error: this target does not support assembly parsing.\n";
return 1;
}
- Parser.setTargetParser(*TAP.get());
+ Parser->setTargetParser(*TAP.get());
- int Res = Parser.Run(NoInitialTextSection);
+ int Res = Parser->Run(NoInitialTextSection);
delete Out;
// Delete output on errors.