iterator_range for machine block terminators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206421 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2014-04-16 22:37:58 +00:00
parent 57f45392e2
commit 3abd729d21

View File

@ -242,6 +242,12 @@ public:
reverse_iterator rend () { return instr_rend(); }
const_reverse_iterator rend () const { return instr_rend(); }
inline iterator_range<iterator> terminators() {
return iterator_range<iterator>(getFirstTerminator(), end());
}
inline iterator_range<const_iterator> terminators() const {
return iterator_range<const_iterator>(getFirstTerminator(), end());
}
// Machine-CFG iterators
typedef std::vector<MachineBasicBlock *>::iterator pred_iterator;