From: Daniel Sanders Date: Tue, 15 Sep 2015 13:46:21 +0000 (+0000) Subject: Revert r247684 - Replace Triple with a new TargetTuple ... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04be86844a08ca6283f40501a9498860fd518cb7;p=clang Revert r247684 - Replace Triple with a new TargetTuple ... LLDB needs to be updated in the same commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247686 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseStmtAsm.cpp b/lib/Parse/ParseStmtAsm.cpp index e1f7b41960..d3281393f9 100644 --- a/lib/Parse/ParseStmtAsm.cpp +++ b/lib/Parse/ParseStmtAsm.cpp @@ -546,8 +546,8 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { std::unique_ptr TargetParser( TheTarget->createMCAsmParser(*STI, *Parser, *MII, MCOptions)); - std::unique_ptr IP(TheTarget->createMCInstPrinter( - llvm::TargetTuple(llvm::Triple(TT)), 1, *MAI, *MII, *MRI)); + std::unique_ptr IP( + TheTarget->createMCInstPrinter(llvm::Triple(TT), 1, *MAI, *MII, *MRI)); // Change to the Intel dialect. Parser->setAssemblerDialect(1); diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index 3bb9926df0..fd0fbb4c5a 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -358,8 +358,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, // 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(AssemblerInvocation &Opts, 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); }