const MCExpr *ForceExpAbs(MCStreamer *Streamer, MCContext &Context,
const MCExpr* Expr);
+ void EmitFrames(bool usingCFI);
+
public:
virtual ~MCStreamer();
if (getContext().hasDwarfFiles() && !UseLoc)
MCDwarfFileTable::Emit(this);
- if (getNumFrameInfos() && !UseCFI)
- MCDwarfFrameEmitter::Emit(*this, false);
+ if (!UseCFI)
+ EmitFrames(false);
}
MCStreamer *llvm::createAsmStreamer(MCContext &Context,
}
void MCELFStreamer::Finish() {
- if (getNumFrameInfos())
- MCDwarfFrameEmitter::Emit(*this, true);
+ EmitFrames(true);
for (std::vector<LocalCommon>::const_iterator i = LocalCommons.begin(),
e = LocalCommons.end();
}
void MCMachOStreamer::Finish() {
- if (getNumFrameInfos())
- MCDwarfFrameEmitter::Emit(*this, true);
+ EmitFrames(true);
// We have to set the fragment atom associations so we can relax properly for
// Mach-O.
T.toVector(Str);
EmitRawText(Str.str());
}
+
+void MCStreamer::EmitFrames(bool usingCFI) {
+ if (!getNumFrameInfos())
+ return;
+
+ if (EmitEHFrame)
+ MCDwarfFrameEmitter::Emit(*this, usingCFI);
+}