Skip to content

Make Ownership of MachineModuleInfo in Its Wrapper Pass External #110443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6a78a68
Made MMIWP not have control over the lifetime of MMI.
matinraayai Sep 29, 2024
c2d984a
Moved the MC pass creation functions from TargetMachine to LLVMTarget…
matinraayai Sep 29, 2024
ed40387
Migrated BackendUtil.cpp to the new LLVMTargetMachine code emission API.
matinraayai Sep 29, 2024
75dd38a
Migrated DeviceOffload.cpp to the new LLVMTargetMachine code emission…
matinraayai Sep 29, 2024
00be9bf
Migrated Wasm.cpp to the new LLVMTargetMachine code emission API.
matinraayai Sep 29, 2024
7bee39f
Migrated ClangLinkerWrapper.cpp to the new LLVMTargetMachine code emi…
matinraayai Sep 29, 2024
d9fcf48
Migrated FrontendActions.cpp to the new LLVMTargetMachine code emissi…
matinraayai Sep 29, 2024
631cbb2
Migrated MCJIT.cpp to the new LLVMTargetMachine code emission API.
matinraayai Sep 29, 2024
e8e81db
Migrated CompileUtils.cpp to the new LLVMTargetMachine code emission …
matinraayai Sep 29, 2024
4cfc73e
Moved the MC emission APIs to TargetMachine again to keep the PR chan…
matinraayai Sep 29, 2024
4ca0afb
Migrated LTOBackend.cpp to use the new TargetMachine MC emission API.
matinraayai Sep 29, 2024
b33936c
Migrated ThinLTOCodeGenerator.cpp to use the new TargetMachine MC emi…
matinraayai Sep 29, 2024
e945366
Migrated NVPTXTargetMachine.h to use the new TargetMachine MC emissio…
matinraayai Sep 29, 2024
737685e
Migrated the remaining test files to the new MMIWP constructor.
matinraayai Sep 29, 2024
0a6575c
clang tidy.
matinraayai Sep 29, 2024
753d99a
Fixed compilation issue.
matinraayai Sep 30, 2024
9ba7913
Fixed default construction of MMI in the AsmPrinterDwarfTest.
matinraayai Sep 30, 2024
ead138a
Create LLVMTargetMachineC.cpp to implement the MC-emission related th…
matinraayai Oct 1, 2024
928014d
Added missing line at the end of LLVMTargetMachineC.cpp.
matinraayai Oct 2, 2024
1beda2a
Added missing line at the end of LLVMTargetMachineC.cpp.
matinraayai Oct 2, 2024
d4a5620
Next line issue in LLVMTargetMachineC.cpp.
matinraayai Oct 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions clang/lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/RegAllocRegistry.h"
#include "llvm/CodeGen/SchedulerRegistry.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
Expand Down Expand Up @@ -167,8 +168,9 @@ class EmitAssemblyHelper {
/// Add passes necessary to emit assembly or LLVM IR.
///
/// \return True on success.
bool AddEmitPasses(legacy::PassManager &CodeGenPasses, BackendAction Action,
raw_pwrite_stream &OS, raw_pwrite_stream *DwoOS);
bool AddEmitPasses(legacy::PassManager &CodeGenPasses, MachineModuleInfo &MMI,
BackendAction Action, raw_pwrite_stream &OS,
raw_pwrite_stream *DwoOS);

std::unique_ptr<llvm::ToolOutputFile> openOutputFile(StringRef Path) {
std::error_code EC;
Expand Down Expand Up @@ -613,6 +615,7 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
}

bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager &CodeGenPasses,
MachineModuleInfo &MMI,
BackendAction Action,
raw_pwrite_stream &OS,
raw_pwrite_stream *DwoOS) {
Expand All @@ -625,7 +628,7 @@ bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager &CodeGenPasses,
// this also adds codegenerator level optimization passes.
CodeGenFileType CGFT = getCodeGenFileType(Action);

if (TM->addPassesToEmitFile(CodeGenPasses, OS, DwoOS, CGFT,
if (TM->addPassesToEmitFile(CodeGenPasses, MMI, OS, DwoOS, CGFT,
/*DisableVerify=*/!CodeGenOpts.VerifyModule)) {
Diags.Report(diag::err_fe_unable_to_interface_with_target);
return false;
Expand Down Expand Up @@ -1162,6 +1165,7 @@ void EmitAssemblyHelper::RunCodegenPipeline(
// does not work with the codegen pipeline.
// FIXME: make the new PM work with the codegen pipeline.
legacy::PassManager CodeGenPasses;
std::unique_ptr<MachineModuleInfo> MMI;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this just be MachineModuleInfo MMI; below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it to a normal construction with the TM.


// Append any output we need to the pass manager.
switch (Action) {
Expand All @@ -1175,7 +1179,9 @@ void EmitAssemblyHelper::RunCodegenPipeline(
if (!DwoOS)
return;
}
if (!AddEmitPasses(CodeGenPasses, Action, *OS,
MMI = std::make_unique<MachineModuleInfo>(
static_cast<LLVMTargetMachine *>(TM.get()));
if (!AddEmitPasses(CodeGenPasses, *MMI, Action, *OS,
DwoOS ? &DwoOS->os() : nullptr))
// FIXME: Should we handle this error differently?
return;
Expand Down
11 changes: 7 additions & 4 deletions clang/lib/Interpreter/DeviceOffload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Interpreter/PartialTranslationUnit.h"

#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/TargetRegistry.h"
Expand Down Expand Up @@ -82,16 +83,18 @@ llvm::Expected<llvm::StringRef> IncrementalCUDADeviceParser::GeneratePTX() {
return llvm::make_error<llvm::StringError>(std::move(Error),
std::error_code());
llvm::TargetOptions TO = llvm::TargetOptions();
llvm::TargetMachine *TargetMachine = Target->createTargetMachine(
PTU.TheModule->getTargetTriple(), TargetOpts.CPU, "", TO,
llvm::Reloc::Model::PIC_);
auto *TargetMachine =
static_cast<llvm::LLVMTargetMachine *>(Target->createTargetMachine(
PTU.TheModule->getTargetTriple(), TargetOpts.CPU, "", TO,
llvm::Reloc::Model::PIC_));
PTU.TheModule->setDataLayout(TargetMachine->createDataLayout());

PTXCode.clear();
llvm::raw_svector_ostream dest(PTXCode);

llvm::legacy::PassManager PM;
if (TargetMachine->addPassesToEmitFile(PM, dest, nullptr,
llvm::MachineModuleInfo MMI(TargetMachine);
if (TargetMachine->addPassesToEmitFile(PM, MMI, dest, nullptr,
llvm::CodeGenFileType::AssemblyFile)) {
return llvm::make_error<llvm::StringError>(
"NVPTX backend cannot produce PTX code.",
Expand Down
9 changes: 6 additions & 3 deletions clang/lib/Interpreter/Wasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "Wasm.h"
#include "IncrementalExecutor.h"

#include <llvm/CodeGen/MachineModuleInfo.h>
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/IR/Module.h>
#include <llvm/MC/TargetRegistry.h>
Expand Down Expand Up @@ -48,16 +49,18 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) {
}

llvm::TargetOptions TO = llvm::TargetOptions();
llvm::TargetMachine *TargetMachine = Target->createTargetMachine(
PTU.TheModule->getTargetTriple(), "", "", TO, llvm::Reloc::Model::PIC_);
auto *TargetMachine = static_cast<llvm::LLVMTargetMachine *>(
Target->createTargetMachine(PTU.TheModule->getTargetTriple(), "", "", TO,
llvm::Reloc::Model::PIC_));
PTU.TheModule->setDataLayout(TargetMachine->createDataLayout());
std::string OutputFileName = PTU.TheModule->getName().str() + ".wasm";

std::error_code Error;
llvm::raw_fd_ostream OutputFile(llvm::StringRef(OutputFileName), Error);

llvm::legacy::PassManager PM;
if (TargetMachine->addPassesToEmitFile(PM, OutputFile, nullptr,
llvm::MachineModuleInfo MMI(TargetMachine);
if (TargetMachine->addPassesToEmitFile(PM, MMI, OutputFile, nullptr,
llvm::CodeGenFileType::ObjectFile)) {
return llvm::make_error<llvm::StringError>(
"Wasm backend cannot produce object.", llvm::inconvertibleErrorCode());
Expand Down
8 changes: 5 additions & 3 deletions clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/CodeGen/CommandFlags.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/Frontend/Offloading/OffloadWrapper.h"
#include "llvm/Frontend/Offloading/Utility.h"
#include "llvm/IR/Constants.h"
Expand Down Expand Up @@ -1031,9 +1032,9 @@ Expected<StringRef> compileModule(Module &M, OffloadKind Kind) {
codegen::InitTargetOptionsFromCodeGenFlags(Triple(M.getTargetTriple()));
StringRef CPU = "";
StringRef Features = "";
std::unique_ptr<TargetMachine> TM(
std::unique_ptr<LLVMTargetMachine> TM(static_cast<LLVMTargetMachine *>(
T->createTargetMachine(M.getTargetTriple(), CPU, Features, Options,
Reloc::PIC_, M.getCodeModel()));
Reloc::PIC_, M.getCodeModel())));

if (M.getDataLayout().isDefault())
M.setDataLayout(TM->createDataLayout());
Expand All @@ -1051,9 +1052,10 @@ Expected<StringRef> compileModule(Module &M, OffloadKind Kind) {
auto OS = std::make_unique<llvm::raw_fd_ostream>(FD, true);

legacy::PassManager CodeGenPasses;
MachineModuleInfo MMI(TM.get());
TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple()));
CodeGenPasses.add(new TargetLibraryInfoWrapperPass(TLII));
if (TM->addPassesToEmitFile(CodeGenPasses, *OS, nullptr,
if (TM->addPassesToEmitFile(CodeGenPasses, MMI, *OS, nullptr,
CodeGenFileType::ObjectFile))
return createStringError("Failed to execute host backend");
CodeGenPasses.run(M);
Expand Down
4 changes: 3 additions & 1 deletion flang/lib/Frontend/FrontendActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Bitcode/BitcodeWriterPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/IR/LLVMRemarkStreamer.h"
#include "llvm/IR/LegacyPassManager.h"
Expand Down Expand Up @@ -932,6 +933,7 @@ static void generateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine &diags,
// Currently only the legacy pass manager is supported.
// TODO: Switch to the new PM once it's available in the backend.
llvm::legacy::PassManager codeGenPasses;
llvm::MachineModuleInfo mmi(static_cast<llvm::LLVMTargetMachine *>(&tm));
codeGenPasses.add(
createTargetTransformInfoWrapperPass(tm.getTargetIRAnalysis()));

Expand All @@ -943,7 +945,7 @@ static void generateMachineCodeOrAssemblyImpl(clang::DiagnosticsEngine &diags,
llvm::CodeGenFileType cgft = (act == BackendActionTy::Backend_EmitAssembly)
? llvm::CodeGenFileType::AssemblyFile
: llvm::CodeGenFileType::ObjectFile;
if (tm.addPassesToEmitFile(codeGenPasses, os, nullptr, cgft)) {
if (tm.addPassesToEmitFile(codeGenPasses, mmi, os, nullptr, cgft)) {
unsigned diagID =
diags.getCustomDiagID(clang::DiagnosticsEngine::Error,
"emission of this file type is not supported");
Expand Down
6 changes: 5 additions & 1 deletion llvm/examples/Kaleidoscope/Chapter8/toy.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
Expand Down Expand Up @@ -1257,9 +1258,12 @@ int main() {
}

legacy::PassManager pass;
llvm::MachineModuleInfo MMI(
static_cast<LLVMTargetMachine *>(TheTargetMachine));
auto FileType = CodeGenFileType::ObjectFile;

if (TheTargetMachine->addPassesToEmitFile(pass, dest, nullptr, FileType)) {
if (TheTargetMachine->addPassesToEmitFile(pass, MMI, dest, nullptr,
FileType)) {
errs() << "TheTargetMachine can't emit a file of this type";
return 1;
}
Expand Down
15 changes: 7 additions & 8 deletions llvm/include/llvm/CodeGen/MachineModuleInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,18 @@ class MachineModuleInfo {
const Function *LastRequest = nullptr; ///< Used for shortcut/cache.
MachineFunction *LastResult = nullptr; ///< Used for shortcut/cache.

MachineModuleInfo &operator=(MachineModuleInfo &&MMII) = delete;
/// Deleted copy constructor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is not useful, I'd either say why it's deleted or just remove the comment

MachineModuleInfo(MachineModuleInfo &MMI) = delete;

/// Deleted copy assignment operator
MachineModuleInfo &operator=(MachineModuleInfo &MMI) = delete;

public:
explicit MachineModuleInfo(const LLVMTargetMachine *TM = nullptr);

explicit MachineModuleInfo(const LLVMTargetMachine *TM,
MCContext *ExtContext);

MachineModuleInfo(MachineModuleInfo &&MMII);

~MachineModuleInfo();

void initialize();
Expand Down Expand Up @@ -169,14 +171,11 @@ class MachineModuleInfo {
}; // End class MachineModuleInfo

class MachineModuleInfoWrapperPass : public ImmutablePass {
MachineModuleInfo MMI;
MachineModuleInfo &MMI;

public:
static char ID; // Pass identification, replacement for typeid
explicit MachineModuleInfoWrapperPass(const LLVMTargetMachine *TM = nullptr);

explicit MachineModuleInfoWrapperPass(const LLVMTargetMachine *TM,
MCContext *ExtContext);
explicit MachineModuleInfoWrapperPass(MachineModuleInfo &MMI);

// Initialization and Finalization
bool doInitialization(Module &) override;
Expand Down
43 changes: 17 additions & 26 deletions llvm/include/llvm/Target/TargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ using ModulePassManager = PassManager<Module>;

class Function;
class GlobalValue;
class MachineModuleInfoWrapperPass;
class MachineModuleInfo;
class Mangler;
class MCAsmInfo;
class MCContext;
Expand Down Expand Up @@ -376,25 +376,19 @@ class TargetMachine {
virtual void registerDefaultAliasAnalyses(AAManager &) {}

/// Add passes to the specified pass manager to get the specified file
/// emitted. Typically this will involve several steps of code generation.
/// emitted. Typically this will involve several steps of code generation.
/// This method should return true if emission of this file type is not
/// supported, or false on success.
/// \p MMIWP is an optional parameter that, if set to non-nullptr,
/// will be used to set the MachineModuloInfo for this PM.
virtual bool
addPassesToEmitFile(PassManagerBase &, raw_pwrite_stream &,
raw_pwrite_stream *, CodeGenFileType,
bool /*DisableVerify*/ = true,
MachineModuleInfoWrapperPass *MMIWP = nullptr) {
virtual bool addPassesToEmitFile(PassManagerBase &, MachineModuleInfo &,
raw_pwrite_stream &, raw_pwrite_stream *,
CodeGenFileType,
bool /*DisableVerify*/ = true) {
return true;
}

/// Add passes to the specified pass manager to get machine code emitted with
/// the MCJIT. This method returns true if machine code is not supported. It
/// fills the MCContext Ctx pointer which can be used to build custom
/// MCStreamer.
///
virtual bool addPassesToEmitMC(PassManagerBase &, MCContext *&,
/// the MCJIT. This method returns true if machine code is not supported.
virtual bool addPassesToEmitMC(PassManagerBase &, MachineModuleInfo &,
raw_pwrite_stream &,
bool /*DisableVerify*/ = true) {
return true;
Expand Down Expand Up @@ -460,14 +454,13 @@ class LLVMTargetMachine : public TargetMachine {
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);

/// Add passes to the specified pass manager to get the specified file
/// emitted. Typically this will involve several steps of code generation.
/// \p MMIWP is an optional parameter that, if set to non-nullptr,
/// will be used to set the MachineModuloInfo for this PM.
bool
addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out,
raw_pwrite_stream *DwoOut, CodeGenFileType FileType,
bool DisableVerify = true,
MachineModuleInfoWrapperPass *MMIWP = nullptr) override;
/// emitted. Typically this will involve several steps of code generation.
/// This method should return true if emission of this file type is not
/// supported, or false on success.
bool addPassesToEmitFile(PassManagerBase &PM, MachineModuleInfo &MMI,
raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
CodeGenFileType FileType,
bool DisableVerify = true) override;

virtual Error buildCodeGenPipeline(ModulePassManager &, raw_pwrite_stream &,
raw_pwrite_stream *, CodeGenFileType,
Expand All @@ -478,10 +471,8 @@ class LLVMTargetMachine : public TargetMachine {
}

/// Add passes to the specified pass manager to get machine code emitted with
/// the MCJIT. This method returns true if machine code is not supported. It
/// fills the MCContext Ctx pointer which can be used to build custom
/// MCStreamer.
bool addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
/// the MCJIT. This method returns true if machine code is not supported.
bool addPassesToEmitMC(PassManagerBase &PM, MachineModuleInfo &MMI,
raw_pwrite_stream &Out,
bool DisableVerify = true) override;

Expand Down
1 change: 1 addition & 0 deletions llvm/lib/CodeGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ add_llvm_component_library(LLVMCodeGen
LiveStacks.cpp
LiveVariables.cpp
LLVMTargetMachine.cpp
LLVMTargetMachineC.cpp
LocalStackSlotAllocation.cpp
LoopTraversal.cpp
LowLevelTypeUtils.cpp
Expand Down
23 changes: 10 additions & 13 deletions llvm/lib/CodeGen/LLVMTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,10 @@ Expected<std::unique_ptr<MCStreamer>> LLVMTargetMachine::createMCStreamer(
}

bool LLVMTargetMachine::addPassesToEmitFile(
PassManagerBase &PM, raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
CodeGenFileType FileType, bool DisableVerify,
MachineModuleInfoWrapperPass *MMIWP) {
PassManagerBase &PM, MachineModuleInfo &MMI, raw_pwrite_stream &Out,
raw_pwrite_stream *DwoOut, CodeGenFileType FileType, bool DisableVerify) {
// Add common CodeGen passes.
if (!MMIWP)
MMIWP = new MachineModuleInfoWrapperPass(this);
auto *MMIWP = new MachineModuleInfoWrapperPass(MMI);
TargetPassConfig *PassConfig =
addPassesToGenerateCode(*this, PM, DisableVerify, *MMIWP);
if (!PassConfig)
Expand All @@ -235,22 +233,21 @@ bool LLVMTargetMachine::addPassesToEmitFile(

/// addPassesToEmitMC - Add passes to the specified pass manager to get
/// machine code emitted with the MCJIT. This method returns true if machine
/// code is not supported. It fills the MCContext Ctx pointer which can be
/// used to build custom MCStreamer.
///
bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
/// code is not supported.
bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
MachineModuleInfo &MMI,
raw_pwrite_stream &Out,
bool DisableVerify) {
// Add common CodeGen passes.
MachineModuleInfoWrapperPass *MMIWP = new MachineModuleInfoWrapperPass(this);
MachineModuleInfoWrapperPass *MMIWP = new MachineModuleInfoWrapperPass(MMI);
TargetPassConfig *PassConfig =
addPassesToGenerateCode(*this, PM, DisableVerify, *MMIWP);
if (!PassConfig)
return true;
assert(TargetPassConfig::willCompleteCodeGenPipeline() &&
"Cannot emit MC with limited codegen pipeline");

Ctx = &MMIWP->getMMI().getContext();
auto &Ctx = MMI.getContext();
// libunwind is unable to load compact unwind dynamically, so we must generate
// DWARF unwind info for the JIT.
Options.MCOptions.EmitDwarfUnwind = EmitDwarfUnwindType::Always;
Expand All @@ -260,7 +257,7 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
const MCSubtargetInfo &STI = *getMCSubtargetInfo();
const MCRegisterInfo &MRI = *getMCRegisterInfo();
std::unique_ptr<MCCodeEmitter> MCE(
getTarget().createMCCodeEmitter(*getMCInstrInfo(), *Ctx));
getTarget().createMCCodeEmitter(*getMCInstrInfo(), Ctx));
if (!MCE)
return true;
MCAsmBackend *MAB =
Expand All @@ -270,7 +267,7 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,

const Triple &T = getTargetTriple();
std::unique_ptr<MCStreamer> AsmStreamer(getTarget().createMCObjectStreamer(
T, *Ctx, std::unique_ptr<MCAsmBackend>(MAB), MAB->createObjectWriter(Out),
T, Ctx, std::unique_ptr<MCAsmBackend>(MAB), MAB->createObjectWriter(Out),
std::move(MCE), STI));

// Create the AsmPrinter, which takes ownership of AsmStreamer if successful.
Expand Down
Loading