[llvm] r281188 - MC: Move MCSection::begin/end to header, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 11 17:17:09 PDT 2016


Author: dexonsmith
Date: Sun Sep 11 19:17:09 2016
New Revision: 281188

URL: http://llvm.org/viewvc/llvm-project?rev=281188&view=rev
Log:
MC: Move MCSection::begin/end to header, NFC

Modified:
    llvm/trunk/include/llvm/MC/MCSection.h
    llvm/trunk/lib/MC/MCSection.cpp

Modified: llvm/trunk/include/llvm/MC/MCSection.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCSection.h?rev=281188&r1=281187&r2=281188&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCSection.h (original)
+++ llvm/trunk/include/llvm/MC/MCSection.h Sun Sep 11 19:17:09 2016
@@ -153,25 +153,17 @@ public:
   const MCDummyFragment &getDummyFragment() const { return DummyFragment; }
   MCDummyFragment &getDummyFragment() { return DummyFragment; }
 
-  MCSection::iterator begin();
-  MCSection::const_iterator begin() const {
-    return const_cast<MCSection *>(this)->begin();
-  }
-
-  MCSection::iterator end();
-  MCSection::const_iterator end() const {
-    return const_cast<MCSection *>(this)->end();
-  }
-
-  MCSection::reverse_iterator rbegin();
-  MCSection::const_reverse_iterator rbegin() const {
-    return const_cast<MCSection *>(this)->rbegin();
-  }
-
-  MCSection::reverse_iterator rend();
-  MCSection::const_reverse_iterator rend() const {
-    return const_cast<MCSection *>(this)->rend();
-  }
+  iterator begin() { return Fragments.begin(); }
+  const_iterator begin() const { return Fragments.begin(); }
+
+  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);
 

Modified: llvm/trunk/lib/MC/MCSection.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCSection.cpp?rev=281188&r1=281187&r2=281188&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCSection.cpp (original)
+++ llvm/trunk/lib/MC/MCSection.cpp Sun Sep 11 19:17:09 2016
@@ -97,11 +97,3 @@ LLVM_DUMP_METHOD void MCSection::dump()
   }
   OS << "]>";
 }
-
-MCSection::iterator MCSection::begin() { return Fragments.begin(); }
-
-MCSection::iterator MCSection::end() { return Fragments.end(); }
-
-MCSection::reverse_iterator MCSection::rbegin() { return Fragments.rbegin(); }
-
-MCSection::reverse_iterator MCSection::rend() { return Fragments.rend(); }




More information about the llvm-commits mailing list