Skip to content
Snippets Groups Projects
Commit 1693eda7 authored by Daniel Sanders's avatar Daniel Sanders
Browse files

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

Eric has replied and has demanded the patch be reverted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247702 91177308-0d34-0410-b5e6-96231b3b80d8
parent e90b1c23
No related branches found
No related tags found
No related merge requests found
...@@ -546,8 +546,8 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) { ...@@ -546,8 +546,8 @@ StmtResult Parser::ParseMicrosoftAsmStatement(SourceLocation AsmLoc) {
std::unique_ptr<llvm::MCTargetAsmParser> TargetParser( std::unique_ptr<llvm::MCTargetAsmParser> TargetParser(
TheTarget->createMCAsmParser(*STI, *Parser, *MII, MCOptions)); TheTarget->createMCAsmParser(*STI, *Parser, *MII, MCOptions));
std::unique_ptr<llvm::MCInstPrinter> IP(TheTarget->createMCInstPrinter( std::unique_ptr<llvm::MCInstPrinter> IP(
llvm::TargetTuple(llvm::Triple(TT)), 1, *MAI, *MII, *MRI)); TheTarget->createMCInstPrinter(llvm::Triple(TT), 1, *MAI, *MII, *MRI));
// Change to the Intel dialect. // Change to the Intel dialect.
Parser->setAssemblerDialect(1); Parser->setAssemblerDialect(1);
......
...@@ -358,8 +358,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, ...@@ -358,8 +358,7 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
// FIXME: There is a bit of code duplication with addPassesToEmitFile. // FIXME: There is a bit of code duplication with addPassesToEmitFile.
if (Opts.OutputType == AssemblerInvocation::FT_Asm) { if (Opts.OutputType == AssemblerInvocation::FT_Asm) {
MCInstPrinter *IP = TheTarget->createMCInstPrinter( MCInstPrinter *IP = TheTarget->createMCInstPrinter(
llvm::TargetTuple(llvm::Triple(Opts.Triple)), Opts.OutputAsmVariant, llvm::Triple(Opts.Triple), Opts.OutputAsmVariant, *MAI, *MCII, *MRI);
*MAI, *MCII, *MRI);
MCCodeEmitter *CE = nullptr; MCCodeEmitter *CE = nullptr;
MCAsmBackend *MAB = nullptr; MCAsmBackend *MAB = nullptr;
if (Opts.ShowEncoding) { if (Opts.ShowEncoding) {
...@@ -383,10 +382,10 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, ...@@ -383,10 +382,10 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx); MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple, MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*MRI, Opts.Triple,
Opts.CPU); Opts.CPU);
Triple TT(Opts.Triple); Triple T(Opts.Triple);
Str.reset(TheTarget->createMCObjectStreamer( Str.reset(TheTarget->createMCObjectStreamer(T, Ctx, *MAB, *Out, CE, *STI,
llvm::TargetTuple(TT), Ctx, *MAB, *Out, CE, *STI, Opts.RelaxAll, Opts.RelaxAll,
/*DWARFMustBeAtTheEnd*/ true)); /*DWARFMustBeAtTheEnd*/ true));
Str.get()->InitSections(Opts.NoExecStack); Str.get()->InitSections(Opts.NoExecStack);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment