Skip to content

Commit

Permalink
MC: Move MCSection::begin/end to header, NFC
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281188 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dexonsmith committed Sep 12, 2016
1 parent 52fed49 commit afe5d3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
24 changes: 8 additions & 16 deletions include/llvm/MC/MCSection.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,17 @@ class MCSection {
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);

Expand Down
8 changes: 0 additions & 8 deletions lib/MC/MCSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(); }

0 comments on commit afe5d3d

Please sign in to comment.