[cfe-commits] r108605 - /cfe/trunk/tools/driver/cc1as_main.cpp

Daniel Dunbar daniel at zuster.org
Fri Jul 16 19:26:21 PDT 2010


Author: ddunbar
Date: Fri Jul 16 21:26:21 2010
New Revision: 108605

URL: http://llvm.org/viewvc/llvm-project?rev=108605&view=rev
Log:
clang -cc1as: Switch to using AsmParser constructor function.

Modified:
    cfe/trunk/tools/driver/cc1as_main.cpp

Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=108605&r1=108604&r2=108605&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Fri Jul 16 21:26:21 2010
@@ -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 @@
     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;





More information about the cfe-commits mailing list