[MC] Delete MCSection::{rbegin,rend}
authorFangrui Song <maskray@google.com>
Sun, 5 Jan 2020 20:48:48 +0000 (12:48 -0800)
committerFangrui Song <maskray@google.com>
Sun, 5 Jan 2020 20:51:15 +0000 (12:51 -0800)
llvm/include/llvm/MC/MCSection.h
llvm/lib/MC/MCAssembler.cpp

index c3535b6..d66e42b 100644 (file)
@@ -175,12 +175,6 @@ public:
   iterator end() { return Fragments.end(); }
   const_iterator end() const { return Fragments.end(); }
 
-  reverse_iterator rbegin() { return Fragments.rbegin(); }
-  const_reverse_iterator rbegin() const { return Fragments.rbegin(); }
-
-  reverse_iterator rend() { return Fragments.rend(); }
-  const_reverse_iterator rend() const  { return Fragments.rend(); }
-
   MCSection::iterator getSubsectionInsertionPoint(unsigned Subsection);
 
   void dump() const;
index c7c6639..332d93b 100644 (file)
@@ -1169,8 +1169,8 @@ void MCAssembler::finishLayout(MCAsmLayout &Layout) {
   // The layout is done. Mark every fragment as valid.
   for (unsigned int i = 0, n = Layout.getSectionOrder().size(); i != n; ++i) {
     MCSection &Section = *Layout.getSectionOrder()[i];
-    Layout.getFragmentOffset(&*Section.rbegin());
-    computeFragmentSize(Layout, *Section.rbegin());
+    Layout.getFragmentOffset(&*Section.getFragmentList().rbegin());
+    computeFragmentSize(Layout, *Section.getFragmentList().rbegin());
   }
   getBackend().finishLayout(*this, Layout);
 }