From: Daniel Sanders Date: Mon, 15 Jun 2015 10:34:38 +0000 (+0000) Subject: Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11114b0ac4cdadca58d1acd0bfc6c8363f13b021;p=clang Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC. It appears to cause sparc-little-endian.s to assert on Windows and Darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239724 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseStmtAsm.cpp b/lib/Parse/ParseStmtAsm.cpp index 8cdae6a74b..8ba9f15f0a 100644 --- a/lib/Parse/ParseStmtAsm.cpp +++ b/lib/Parse/ParseStmtAsm.cpp @@ -512,8 +512,8 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { llvm::SourceMgr TempSrcMgr; llvm::MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &TempSrcMgr); - MOFI->InitMCObjectFileInfo(TheTriple, llvm::Reloc::Default, - llvm::CodeModel::Default, Ctx); + MOFI->InitMCObjectFileInfo(TT, llvm::Reloc::Default, llvm::CodeModel::Default, + Ctx); std::unique_ptr Buffer = llvm::MemoryBuffer::getMemBuffer(AsmString, ""); diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index f7ac17f143..f73d07bd0b 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -323,8 +323,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, MCContext Ctx(MAI.get(), MRI.get(), MOFI.get(), &SrcMgr); // FIXME: Assembler behavior can change with -static. - MOFI->InitMCObjectFileInfo(Triple(Opts.Triple), Reloc::Default, - CodeModel::Default, Ctx); + MOFI->InitMCObjectFileInfo(Opts.Triple, + Reloc::Default, CodeModel::Default, Ctx); if (Opts.SaveTemporaryLabels) Ctx.setAllowTemporaryLabels(false); if (Opts.GenDwarfForAssembly)