summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-09-12 00:17:09 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-09-12 00:17:09 +0000
commitcd0fffb6e1f779884a9df21d898635ab9d72954c (patch)
tree082fd1a0037ca344480d7404eb30a11155be0746 /llvm
parent60312bc45f65f6e8fecdc1e4c99672f6f72d6ce3 (diff)
downloadbcm5719-llvm-cd0fffb6e1f779884a9df21d898635ab9d72954c.tar.gz
bcm5719-llvm-cd0fffb6e1f779884a9df21d898635ab9d72954c.zip
MC: Move MCSection::begin/end to header, NFC
llvm-svn: 281188
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/MC/MCSection.h24
-rw-r--r--llvm/lib/MC/MCSection.cpp8
2 files changed, 8 insertions, 24 deletions
diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h
index 7996aea6384..d4c31696b40 100644
--- a/llvm/include/llvm/MC/MCSection.h
+++ b/llvm/include/llvm/MC/MCSection.h
@@ -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();
- }
+ iterator begin() { return Fragments.begin(); }
+ const_iterator begin() const { return Fragments.begin(); }
- MCSection::iterator end();
- MCSection::const_iterator end() const {
- return const_cast<MCSection *>(this)->end();
- }
+ iterator end() { return Fragments.end(); }
+ const_iterator end() const { return Fragments.end(); }
- MCSection::reverse_iterator rbegin();
- MCSection::const_reverse_iterator rbegin() const {
- return const_cast<MCSection *>(this)->rbegin();
- }
+ reverse_iterator rbegin() { return Fragments.rbegin(); }
+ const_reverse_iterator rbegin() const { return Fragments.rbegin(); }
- MCSection::reverse_iterator rend();
- MCSection::const_reverse_iterator rend() const {
- return const_cast<MCSection *>(this)->rend();
- }
+ reverse_iterator rend() { return Fragments.rend(); }
+ const_reverse_iterator rend() const { return Fragments.rend(); }
MCSection::iterator getSubsectionInsertionPoint(unsigned Subsection);
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index c5e4077a306..9064cdf2f31 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -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(); }
OpenPOWER on IntegriCloud