summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-11-06 13:14:59 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-11-06 13:14:59 +0000
commit97588e15648dc54bfe6bf242da39781947c20a47 (patch)
tree078c3f9c6d7b7062a24c8421bcef9dd6a5e79123 /llvm/lib/MC/MCDwarf.cpp
parentf24741d9dcaac2b8b80c00b59c8cd0d361c7098f (diff)
downloadbcm5719-llvm-97588e15648dc54bfe6bf242da39781947c20a47.tar.gz
bcm5719-llvm-97588e15648dc54bfe6bf242da39781947c20a47.zip
Pass SectionStart directly to the one function that uses it.
llvm-svn: 252299
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 85680c01644..2715408aab2 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -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::EmitCIE(const MCSymbol *personality,
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 MCSymbol &cieStart,
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(MCObjectStreamer &Streamer, MCAsmBackend *MAB,
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(MCObjectStreamer &Streamer, MCAsmBackend *MAB,
Frame.Lsda, Frame.IsSignalFrame,
Frame.LsdaEncoding, Frame.IsSimple);
- Emitter.EmitFDE(*CIEStart, Frame, I == E);
+ Emitter.EmitFDE(*CIEStart, Frame, I == E, *SectionStart);
}
}
OpenPOWER on IntegriCloud