mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-10 02:38:50 +00:00
This patch changes a static_cast to dyn_cast
for MipsELFStreamer objects. Contributer: Jack Carter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174354 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
31fb5dafce
commit
9c5b94b6be
@ -57,6 +57,7 @@ namespace llvm {
|
|||||||
SK_ARMELFStreamer,
|
SK_ARMELFStreamer,
|
||||||
SK_MachOStreamer,
|
SK_MachOStreamer,
|
||||||
SK_PureStreamer,
|
SK_PureStreamer,
|
||||||
|
SK_MipsELFStreamer,
|
||||||
SK_WinCOFFStreamer
|
SK_WinCOFFStreamer
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,12 +19,16 @@ public:
|
|||||||
MipsELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
MipsELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
||||||
raw_ostream &OS, MCCodeEmitter *Emitter,
|
raw_ostream &OS, MCCodeEmitter *Emitter,
|
||||||
bool RelaxAll, bool NoExecStack)
|
bool RelaxAll, bool NoExecStack)
|
||||||
: MCELFStreamer(Context, TAB, OS, Emitter) {
|
: MCELFStreamer(SK_MipsELFStreamer, Context, TAB, OS, Emitter) {
|
||||||
}
|
}
|
||||||
|
|
||||||
~MipsELFStreamer() {}
|
~MipsELFStreamer() {}
|
||||||
void emitELFHeaderFlagsCG(const MipsSubtarget &Subtarget);
|
void emitELFHeaderFlagsCG(const MipsSubtarget &Subtarget);
|
||||||
// void emitELFHeaderFlagCG(unsigned Val);
|
// void emitELFHeaderFlagCG(unsigned Val);
|
||||||
|
|
||||||
|
static bool classof(const MCStreamer *S) {
|
||||||
|
return S->getKind() == SK_MipsELFStreamer;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
MCELFStreamer* createMipsELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
MCELFStreamer* createMipsELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
||||||
|
@ -551,8 +551,8 @@ void MipsAsmPrinter::EmitEndOfAsmFile(Module &M) {
|
|||||||
// Emit Mips ELF register info
|
// Emit Mips ELF register info
|
||||||
Subtarget->getMReginfo().emitMipsReginfoSectionCG(
|
Subtarget->getMReginfo().emitMipsReginfoSectionCG(
|
||||||
OutStreamer, getObjFileLowering(), *Subtarget);
|
OutStreamer, getObjFileLowering(), *Subtarget);
|
||||||
MipsELFStreamer & MES = static_cast<MipsELFStreamer &>(OutStreamer);
|
if (MipsELFStreamer *MES = dyn_cast<MipsELFStreamer>(&OutStreamer))
|
||||||
MES.emitELFHeaderFlagsCG(*Subtarget);
|
MES->emitELFHeaderFlagsCG(*Subtarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
MachineLocation
|
MachineLocation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user