diff options
Diffstat (limited to 'llvm/lib/MC/MCSection.cpp')
-rw-r--r-- | llvm/lib/MC/MCSection.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp index 9b784a6..0fb9e8e 100644 --- a/llvm/lib/MC/MCSection.cpp +++ b/llvm/lib/MC/MCSection.cpp @@ -113,11 +113,13 @@ void MCSection::flushPendingLabels() { PendingLabel& Label = PendingLabels[0]; iterator CurInsertionPoint = this->getSubsectionInsertionPoint(Label.Subsection); + const MCSymbol *Atom = nullptr; + if (CurInsertionPoint != begin()) + Atom = std::prev(CurInsertionPoint)->getAtom(); MCFragment *F = new MCDataFragment(); getFragmentList().insert(CurInsertionPoint, F); F->setParent(this); - if (CurInsertionPoint != begin()) - F->setAtom(std::prev(CurInsertionPoint)->getAtom()); + F->setAtom(Atom); flushPendingLabels(F, 0, Label.Subsection); } } |