MC: Remove implicit ilist iterator conversions, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 10 Oct 2015 00:13:11 +0000 (00:13 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 10 Oct 2015 00:13:11 +0000 (00:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249922 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCAssembler.cpp
lib/MC/MCMachOStreamer.cpp
lib/MC/MCObjectStreamer.cpp
lib/MC/MCSection.cpp

index c656b8a14d10cd12f5c6ee234a7a5362e5201fee..971dc526ea6373a091fd7cf68a6be2377c62e497 100644 (file)
@@ -1095,7 +1095,7 @@ bool MCAssembler::layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec) {
       break;
     }
     if (RelaxedFrag && !FirstRelaxedFragment)
-      FirstRelaxedFragment = I;
+      FirstRelaxedFragment = &*I;
   }
   if (FirstRelaxedFragment) {
     Layout.invalidateFragmentsFrom(FirstRelaxedFragment);
index 50ee08fa1f9eec742fb6315a88d1bb4ebfbf56ce..f7a06158eea6471ef802be26f2a4fc6ec66e9a6a 100644 (file)
@@ -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);
     }
index 992b2cfe359ac4e5cef428f488ba5fc49f4941d8..0da61b5ddce66c839f661987fa5983cc2505f9f7 100644 (file)
@@ -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;
 }
index e0d29bbd6600ae5d754c39e974b62be8e19e47eb..dbd544a44ce32afd56ae34891ecd5f975c65e1b4 100644 (file)
@@ -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.