diff options
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index ae4e691..bf1ce76 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -180,7 +180,6 @@ void MCObjectStreamer::reset() { if (getContext().getTargetOptions()) Assembler->setRelaxAll(getContext().getTargetOptions()->MCRelaxAll); } - CurInsertionPoint = MCSection::iterator(); EmitEHFrame = true; EmitDebugFrame = false; PendingLabels.clear(); @@ -200,12 +199,7 @@ void MCObjectStreamer::emitFrames(MCAsmBackend *MAB) { } MCFragment *MCObjectStreamer::getCurrentFragment() const { - assert(getCurrentSectionOnly() && "No current section!"); - - if (CurInsertionPoint != getCurrentSectionOnly()->begin()) - return &*std::prev(CurInsertionPoint); - - return nullptr; + return getCurrentSectionOnly()->curFragList()->Tail; } static bool canReuseDataFragment(const MCDataFragment &F, @@ -391,8 +385,7 @@ bool MCObjectStreamer::changeSectionImpl(MCSection *Section, } CurSubsectionIdx = unsigned(IntSubsection); - CurInsertionPoint = - Section->getSubsectionInsertionPoint(CurSubsectionIdx); + Section->switchSubsection(CurSubsectionIdx); return Created; } |