mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Factor some code into a new EmitFrames method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1070,8 +1070,8 @@ void MCAsmStreamer::Finish() {
|
||||
if (getContext().hasDwarfFiles() && !UseLoc)
|
||||
MCDwarfFileTable::Emit(this);
|
||||
|
||||
if (getNumFrameInfos() && !UseCFI)
|
||||
MCDwarfFrameEmitter::Emit(*this, false);
|
||||
if (!UseCFI)
|
||||
EmitFrames(false);
|
||||
}
|
||||
|
||||
MCStreamer *llvm::createAsmStreamer(MCContext &Context,
|
||||
|
@@ -345,8 +345,7 @@ void MCELFStreamer::EmitInstToData(const MCInst &Inst) {
|
||||
}
|
||||
|
||||
void MCELFStreamer::Finish() {
|
||||
if (getNumFrameInfos())
|
||||
MCDwarfFrameEmitter::Emit(*this, true);
|
||||
EmitFrames(true);
|
||||
|
||||
for (std::vector<LocalCommon>::const_iterator i = LocalCommons.begin(),
|
||||
e = LocalCommons.end();
|
||||
|
@@ -377,8 +377,7 @@ void MCMachOStreamer::EmitInstToData(const MCInst &Inst) {
|
||||
}
|
||||
|
||||
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.
|
||||
|
@@ -363,3 +363,11 @@ void MCStreamer::EmitRawText(const Twine &T) {
|
||||
T.toVector(Str);
|
||||
EmitRawText(Str.str());
|
||||
}
|
||||
|
||||
void MCStreamer::EmitFrames(bool usingCFI) {
|
||||
if (!getNumFrameInfos())
|
||||
return;
|
||||
|
||||
if (EmitEHFrame)
|
||||
MCDwarfFrameEmitter::Emit(*this, usingCFI);
|
||||
}
|
||||
|
Reference in New Issue
Block a user