diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-07-17 02:26:21 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-07-17 02:26:21 +0000 |
commit | 7374f1b407a86df83fde942ee9f3684a3159f99f (patch) | |
tree | ee8fe4ab91c4dae0f25a2cabcf1bea338b1eaac4 /tools | |
parent | cb07788e20f63ee61862af1c5ee711d9f4c5bf0e (diff) |
clang -cc1as: Switch to using AsmParser constructor function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/driver/cc1as_main.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index 3c5ca9213f..413995dc4d 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -24,7 +24,8 @@ #include "clang/Frontend/TextDiagnosticPrinter.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/StringSwitch.h" -#include "llvm/MC/MCParser/AsmParser.h" +#include "llvm/MC/MCParser/MCAsmParser.h" +#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCStreamer.h" @@ -275,16 +276,17 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Diagnostic &Diags) { Str.reset(createMachOStreamer(Ctx, *TAB, *Out, CE.get(), Opts.RelaxAll)); } - 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) { Diags.Report(diag::err_target_unknown_triple) << Opts.Triple; return false; } - Parser.setTargetParser(*TAP.get()); + Parser->setTargetParser(*TAP.get()); - bool Success = !Parser.Run(Opts.NoInitialTextSection); + bool Success = !Parser->Run(Opts.NoInitialTextSection); // Close the output. delete Out; |