r247702 - Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.

Daniel Sanders via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 09:17:28 PDT 2015


Author: dsanders
Date: Tue Sep 15 11:17:27 2015
New Revision: 247702

URL: http://llvm.org/viewvc/llvm-project?rev=247702&view=rev
Log:
Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.

Eric has replied and has demanded the patch be reverted.


Modified:
    cfe/trunk/lib/Parse/ParseStmtAsm.cpp
    cfe/trunk/tools/driver/cc1as_main.cpp

Modified: cfe/trunk/lib/Parse/ParseStmtAsm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmtAsm.cpp?rev=247702&r1=247701&r2=247702&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmtAsm.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmtAsm.cpp Tue Sep 15 11:17:27 2015
@@ -546,8 +546,8 @@ StmtResult Parser::ParseMicrosoftAsmStat
   std::unique_ptr<llvm::MCTargetAsmParser> TargetParser(
       TheTarget->createMCAsmParser(*STI, *Parser, *MII, MCOptions));
 
-  std::unique_ptr<llvm::MCInstPrinter> IP(TheTarget->createMCInstPrinter(
-      llvm::TargetTuple(llvm::Triple(TT)), 1, *MAI, *MII, *MRI));
+  std::unique_ptr<llvm::MCInstPrinter> IP(
+      TheTarget->createMCInstPrinter(llvm::Triple(TT), 1, *MAI, *MII, *MRI));
 
   // Change to the Intel dialect.
   Parser->setAssemblerDialect(1);

Modified: cfe/trunk/tools/driver/cc1as_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1as_main.cpp?rev=247702&r1=247701&r2=247702&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1as_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1as_main.cpp Tue Sep 15 11:17:27 2015
@@ -358,8 +358,7 @@ static bool ExecuteAssembler(AssemblerIn
   // FIXME: There is a bit of code duplication with addPassesToEmitFile.
   if (Opts.OutputType == AssemblerInvocation::FT_Asm) {
     MCInstPrinter *IP = TheTarget->createMCInstPrinter(
-        llvm::TargetTuple(llvm::Triple(Opts.Triple)), Opts.OutputAsmVariant,
-        *MAI, *MCII, *MRI);
+        llvm::Triple(Opts.Triple), Opts.OutputAsmVariant, *MAI, *MCII, *MRI);
     MCCodeEmitter *CE = nullptr;
     MCAsmBackend *MAB = nullptr;
     if (Opts.ShowEncoding) {
@@ -383,10 +382,10 @@ static bool ExecuteAssembler(AssemblerIn
     MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
     MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple,
                                                       Opts.CPU);
-    Triple TT(Opts.Triple);
-    Str.reset(TheTarget->createMCObjectStreamer(
-        llvm::TargetTuple(TT), Ctx, *MAB, *Out, CE, *STI, Opts.RelaxAll,
-        /*DWARFMustBeAtTheEnd*/ true));
+    Triple T(Opts.Triple);
+    Str.reset(TheTarget->createMCObjectStreamer(T, Ctx, *MAB, *Out, CE, *STI,
+                                                Opts.RelaxAll,
+                                                /*DWARFMustBeAtTheEnd*/ true));
     Str.get()->InitSections(Opts.NoExecStack);
   }
 




More information about the cfe-commits mailing list