|
@@ -69,16 +69,19 @@ MCStreamer *createAsmStreamer(MCContext &Ctx,
|
|
/// Takes ownership of \p TAB and \p CE.
|
|
/// Takes ownership of \p TAB and \p CE.
|
|
MCStreamer *createELFStreamer(MCContext &Ctx,
|
|
MCStreamer *createELFStreamer(MCContext &Ctx,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
- raw_pwrite_stream &OS, MCCodeEmitter *CE,
|
|
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&CE,
|
|
bool RelaxAll);
|
|
bool RelaxAll);
|
|
MCStreamer *createMachOStreamer(MCContext &Ctx,
|
|
MCStreamer *createMachOStreamer(MCContext &Ctx,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
- raw_pwrite_stream &OS, MCCodeEmitter *CE,
|
|
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&CE,
|
|
bool RelaxAll, bool DWARFMustBeAtTheEnd,
|
|
bool RelaxAll, bool DWARFMustBeAtTheEnd,
|
|
bool LabelSections = false);
|
|
bool LabelSections = false);
|
|
MCStreamer *createWasmStreamer(MCContext &Ctx,
|
|
MCStreamer *createWasmStreamer(MCContext &Ctx,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
- raw_pwrite_stream &OS, MCCodeEmitter *CE,
|
|
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&CE,
|
|
bool RelaxAll);
|
|
bool RelaxAll);
|
|
|
|
|
|
MCRelocationInfo *createMCRelocationInfo(const Triple &TT, MCContext &Ctx);
|
|
MCRelocationInfo *createMCRelocationInfo(const Triple &TT, MCContext &Ctx);
|
|
@@ -137,22 +140,26 @@ public:
|
|
using MCCodeEmitterCtorTy = MCCodeEmitter *(*)(const MCInstrInfo &II,
|
|
using MCCodeEmitterCtorTy = MCCodeEmitter *(*)(const MCInstrInfo &II,
|
|
const MCRegisterInfo &MRI,
|
|
const MCRegisterInfo &MRI,
|
|
MCContext &Ctx);
|
|
MCContext &Ctx);
|
|
- using ELFStreamerCtorTy = MCStreamer *(*)(const Triple &T, MCContext &Ctx,
|
|
|
|
- std::unique_ptr<MCAsmBackend> &&TAB,
|
|
|
|
- raw_pwrite_stream &OS,
|
|
|
|
- MCCodeEmitter *Emitter,
|
|
|
|
- bool RelaxAll);
|
|
|
|
|
|
+ using ELFStreamerCtorTy =
|
|
|
|
+ MCStreamer *(*)(const Triple &T, MCContext &Ctx,
|
|
|
|
+ std::unique_ptr<MCAsmBackend> &&TAB,
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll);
|
|
using MachOStreamerCtorTy =
|
|
using MachOStreamerCtorTy =
|
|
MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB,
|
|
MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB,
|
|
- raw_pwrite_stream &OS, MCCodeEmitter *Emitter,
|
|
|
|
- bool RelaxAll, bool DWARFMustBeAtTheEnd);
|
|
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll,
|
|
|
|
+ bool DWARFMustBeAtTheEnd);
|
|
using COFFStreamerCtorTy =
|
|
using COFFStreamerCtorTy =
|
|
MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB,
|
|
MCStreamer *(*)(MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB,
|
|
- raw_pwrite_stream &OS, MCCodeEmitter *Emitter,
|
|
|
|
- bool RelaxAll, bool IncrementalLinkerCompatible);
|
|
|
|
- using WasmStreamerCtorTy = MCStreamer
|
|
|
|
- *(*)(const Triple &T, MCContext &Ctx, std::unique_ptr<MCAsmBackend> &&TAB,
|
|
|
|
- raw_pwrite_stream &OS, MCCodeEmitter *Emitter, bool RelaxAll);
|
|
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll,
|
|
|
|
+ bool IncrementalLinkerCompatible);
|
|
|
|
+ using WasmStreamerCtorTy =
|
|
|
|
+ MCStreamer *(*)(const Triple &T, MCContext &Ctx,
|
|
|
|
+ std::unique_ptr<MCAsmBackend> &&TAB,
|
|
|
|
+ raw_pwrite_stream &OS,
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&Emitter, bool RelaxAll);
|
|
using NullTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S);
|
|
using NullTargetStreamerCtorTy = MCTargetStreamer *(*)(MCStreamer &S);
|
|
using AsmTargetStreamerCtorTy = MCTargetStreamer *(*)(
|
|
using AsmTargetStreamerCtorTy = MCTargetStreamer *(*)(
|
|
MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint,
|
|
MCStreamer &S, formatted_raw_ostream &OS, MCInstPrinter *InstPrint,
|
|
@@ -436,7 +443,7 @@ public:
|
|
MCStreamer *createMCObjectStreamer(const Triple &T, MCContext &Ctx,
|
|
MCStreamer *createMCObjectStreamer(const Triple &T, MCContext &Ctx,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
std::unique_ptr<MCAsmBackend> &&TAB,
|
|
raw_pwrite_stream &OS,
|
|
raw_pwrite_stream &OS,
|
|
- MCCodeEmitter *Emitter,
|
|
|
|
|
|
+ std::unique_ptr<MCCodeEmitter> &&Emitter,
|
|
const MCSubtargetInfo &STI, bool RelaxAll,
|
|
const MCSubtargetInfo &STI, bool RelaxAll,
|
|
bool IncrementalLinkerCompatible,
|
|
bool IncrementalLinkerCompatible,
|
|
bool DWARFMustBeAtTheEnd) const {
|
|
bool DWARFMustBeAtTheEnd) const {
|
|
@@ -446,28 +453,32 @@ public:
|
|
llvm_unreachable("Unknown object format");
|
|
llvm_unreachable("Unknown object format");
|
|
case Triple::COFF:
|
|
case Triple::COFF:
|
|
assert(T.isOSWindows() && "only Windows COFF is supported");
|
|
assert(T.isOSWindows() && "only Windows COFF is supported");
|
|
- S = COFFStreamerCtorFn(Ctx, std::move(TAB), OS, Emitter, RelaxAll,
|
|
|
|
- IncrementalLinkerCompatible);
|
|
|
|
|
|
+ S = COFFStreamerCtorFn(Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll, IncrementalLinkerCompatible);
|
|
break;
|
|
break;
|
|
case Triple::MachO:
|
|
case Triple::MachO:
|
|
if (MachOStreamerCtorFn)
|
|
if (MachOStreamerCtorFn)
|
|
- S = MachOStreamerCtorFn(Ctx, std::move(TAB), OS, Emitter, RelaxAll,
|
|
|
|
- DWARFMustBeAtTheEnd);
|
|
|
|
|
|
+ S = MachOStreamerCtorFn(Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll, DWARFMustBeAtTheEnd);
|
|
else
|
|
else
|
|
- S = createMachOStreamer(Ctx, std::move(TAB), OS, Emitter, RelaxAll,
|
|
|
|
- DWARFMustBeAtTheEnd);
|
|
|
|
|
|
+ S = createMachOStreamer(Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll, DWARFMustBeAtTheEnd);
|
|
break;
|
|
break;
|
|
case Triple::ELF:
|
|
case Triple::ELF:
|
|
if (ELFStreamerCtorFn)
|
|
if (ELFStreamerCtorFn)
|
|
- S = ELFStreamerCtorFn(T, Ctx, std::move(TAB), OS, Emitter, RelaxAll);
|
|
|
|
|
|
+ S = ELFStreamerCtorFn(T, Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll);
|
|
else
|
|
else
|
|
- S = createELFStreamer(Ctx, std::move(TAB), OS, Emitter, RelaxAll);
|
|
|
|
|
|
+ S = createELFStreamer(Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll);
|
|
break;
|
|
break;
|
|
case Triple::Wasm:
|
|
case Triple::Wasm:
|
|
if (WasmStreamerCtorFn)
|
|
if (WasmStreamerCtorFn)
|
|
- S = WasmStreamerCtorFn(T, Ctx, std::move(TAB), OS, Emitter, RelaxAll);
|
|
|
|
|
|
+ S = WasmStreamerCtorFn(T, Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll);
|
|
else
|
|
else
|
|
- S = createWasmStreamer(Ctx, std::move(TAB), OS, Emitter, RelaxAll);
|
|
|
|
|
|
+ S = createWasmStreamer(Ctx, std::move(TAB), OS, std::move(Emitter),
|
|
|
|
+ RelaxAll);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
if (ObjectTargetStreamerCtorFn)
|
|
if (ObjectTargetStreamerCtorFn)
|