[llvm] r252299 - Pass SectionStart directly to the one function that uses it.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 05:15:00 PST 2015
Author: rafael
Date: Fri Nov 6 07:14:59 2015
New Revision: 252299
URL: http://llvm.org/viewvc/llvm-project?rev=252299&view=rev
Log:
Pass SectionStart directly to the one function that uses it.
Modified:
llvm/trunk/lib/MC/MCDwarf.cpp
Modified: llvm/trunk/lib/MC/MCDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=252299&r1=252298&r2=252299&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDwarf.cpp (original)
+++ llvm/trunk/lib/MC/MCDwarf.cpp Fri Nov 6 07:14:59 2015
@@ -999,15 +999,12 @@ class FrameEmitterImpl {
int CFAOffset = 0;
int InitialCFAOffset = 0;
bool IsEH;
- const MCSymbol *SectionStart = nullptr;
MCObjectStreamer &Streamer;
public:
FrameEmitterImpl(bool IsEH, MCObjectStreamer &Streamer)
: IsEH(IsEH), Streamer(Streamer) {}
- void setSectionStart(const MCSymbol *Label) { SectionStart = Label; }
-
/// Emit the unwind information in a compact way.
void EmitCompactUnwind(const MCDwarfFrameInfo &frame);
@@ -1016,7 +1013,7 @@ public:
bool IsSignalFrame, unsigned lsdaEncoding,
bool IsSimple);
void EmitFDE(const MCSymbol &cieStart, const MCDwarfFrameInfo &frame,
- bool LastInSection);
+ bool LastInSection, const MCSymbol &SectionStart);
void EmitCFIInstructions(ArrayRef<MCCFIInstruction> Instrs,
MCSymbol *BaseLabel);
void EmitCFIInstruction(const MCCFIInstruction &Instr);
@@ -1371,7 +1368,8 @@ const MCSymbol &FrameEmitterImpl::EmitCI
void FrameEmitterImpl::EmitFDE(const MCSymbol &cieStart,
const MCDwarfFrameInfo &frame,
- bool LastInSection) {
+ bool LastInSection,
+ const MCSymbol &SectionStart) {
MCContext &context = Streamer.getContext();
MCSymbol *fdeStart = context.createTempSymbol();
MCSymbol *fdeEnd = context.createTempSymbol();
@@ -1393,7 +1391,7 @@ void FrameEmitterImpl::EmitFDE(const MCS
emitAbsValue(Streamer, offset, 4);
} else if (!asmInfo->doesDwarfUseRelocationsAcrossSections()) {
const MCExpr *offset =
- MakeStartMinusEndExpr(Streamer, *SectionStart, cieStart, 0);
+ MakeStartMinusEndExpr(Streamer, SectionStart, cieStart, 0);
emitAbsValue(Streamer, offset, 4);
} else {
Streamer.EmitSymbolValue(&cieStart, 4);
@@ -1523,7 +1521,6 @@ void MCDwarfFrameEmitter::Emit(MCObjectS
Streamer.SwitchSection(&Section);
MCSymbol *SectionStart = Context.createTempSymbol();
Streamer.EmitLabel(SectionStart);
- Emitter.setSectionStart(SectionStart);
DenseMap<CIEKey, const MCSymbol *> CIEStarts;
@@ -1546,7 +1543,7 @@ void MCDwarfFrameEmitter::Emit(MCObjectS
Frame.Lsda, Frame.IsSignalFrame,
Frame.LsdaEncoding, Frame.IsSimple);
- Emitter.EmitFDE(*CIEStart, Frame, I == E);
+ Emitter.EmitFDE(*CIEStart, Frame, I == E, *SectionStart);
}
}
More information about the llvm-commits
mailing list