mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Split the object streamer callback in one per file format.
There are two main advantages to doing this * Targets that only need to handle one of the formats specially don't have to worry about the others. For example, x86 now only registers a constructor for the COFF streamer. * Changes to the arguments passed to one format constructor will not impact the other formats. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -423,16 +423,3 @@ void MCObjectStreamer::FinishImpl() {
|
||||
flushPendingLabels(nullptr);
|
||||
getAssembler().Finish();
|
||||
}
|
||||
|
||||
MCStreamer *llvm::createObjectStreamer(const Triple &T, MCContext &Ctx,
|
||||
MCAsmBackend &TAB, raw_ostream &OS,
|
||||
MCCodeEmitter *Emitter,
|
||||
const MCSubtargetInfo &STI,
|
||||
bool RelaxAll) {
|
||||
switch (T.getObjectFormat()) {
|
||||
default:
|
||||
return nullptr;
|
||||
case Triple::ELF:
|
||||
return createELFStreamer(Ctx, TAB, OS, Emitter, RelaxAll);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user