From: Duncan P. N. Exon Smith Date: Sat, 10 Oct 2015 00:13:11 +0000 (+0000) Subject: MC: Remove implicit ilist iterator conversions, NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d8fcb9d71041be14fe962efeaf7a9fc6bae8267;p=oota-llvm.git MC: Remove implicit ilist iterator conversions, NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249922 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index c656b8a14d1..971dc526ea6 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -1095,7 +1095,7 @@ bool MCAssembler::layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec) { break; } if (RelaxedFrag && !FirstRelaxedFragment) - FirstRelaxedFragment = I; + FirstRelaxedFragment = &*I; } if (FirstRelaxedFragment) { Layout.invalidateFragmentsFrom(FirstRelaxedFragment); diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp index 50ee08fa1f9..f7a06158eea 100644 --- a/lib/MC/MCMachOStreamer.cpp +++ b/lib/MC/MCMachOStreamer.cpp @@ -472,7 +472,7 @@ void MCMachOStreamer::FinishImpl() { const MCSymbol *CurrentAtom = nullptr; for (MCSection::iterator it2 = it->begin(), ie2 = it->end(); it2 != ie2; ++it2) { - if (const MCSymbol *Symbol = DefiningSymbolMap.lookup(it2)) + if (const MCSymbol *Symbol = DefiningSymbolMap.lookup(&*it2)) CurrentAtom = Symbol; it2->setAtom(CurrentAtom); } diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp index 992b2cfe359..0da61b5ddce 100644 --- a/lib/MC/MCObjectStreamer.cpp +++ b/lib/MC/MCObjectStreamer.cpp @@ -94,7 +94,7 @@ MCFragment *MCObjectStreamer::getCurrentFragment() const { assert(getCurrentSectionOnly() && "No current section!"); if (CurInsertionPoint != getCurrentSectionOnly()->getFragmentList().begin()) - return std::prev(CurInsertionPoint); + return &*std::prev(CurInsertionPoint); return nullptr; } diff --git a/lib/MC/MCSection.cpp b/lib/MC/MCSection.cpp index e0d29bbd660..dbd544a44ce 100644 --- a/lib/MC/MCSection.cpp +++ b/lib/MC/MCSection.cpp @@ -72,7 +72,7 @@ MCSection::getSubsectionInsertionPoint(unsigned Subsection) { if (MI == SubsectionFragmentMap.end()) IP = end(); else - IP = MI->second; + IP = MI->second->getIterator(); if (!ExactMatch && Subsection != 0) { // The GNU as documentation claims that subsections have an alignment of 4, // although this appears not to be the case.