diff options
Diffstat (limited to 'lib/Target/Mips/MipsAsmPrinter.cpp')
-rw-r--r-- | lib/Target/Mips/MipsAsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsAsmPrinter.cpp b/lib/Target/Mips/MipsAsmPrinter.cpp index b12cb62..1dc3326 100644 --- a/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/lib/Target/Mips/MipsAsmPrinter.cpp @@ -594,8 +594,8 @@ void MipsAsmPrinter::EmitEndOfAsmFile(Module &M) { // Emit Mips ELF register info Subtarget->getMReginfo().emitMipsReginfoSectionCG( OutStreamer, getObjFileLowering(), *Subtarget); - MipsELFStreamer *MES = cast<MipsELFStreamer>(&OutStreamer); - MES->emitELFHeaderFlagsCG(*Subtarget); + if (MipsELFStreamer *MES = dyn_cast<MipsELFStreamer>(&OutStreamer)) + MES->emitELFHeaderFlagsCG(*Subtarget); } void MipsAsmPrinter::PrintDebugValueComment(const MachineInstr *MI, |