mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 07:31:47 +00:00
Add iterator_ranges for block pred/succ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205603 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
93203457fc
commit
ab585ff20e
@ -256,7 +256,6 @@ public:
|
||||
succ_reverse_iterator;
|
||||
typedef std::vector<MachineBasicBlock *>::const_reverse_iterator
|
||||
const_succ_reverse_iterator;
|
||||
|
||||
pred_iterator pred_begin() { return Predecessors.begin(); }
|
||||
const_pred_iterator pred_begin() const { return Predecessors.begin(); }
|
||||
pred_iterator pred_end() { return Predecessors.end(); }
|
||||
@ -290,6 +289,19 @@ public:
|
||||
}
|
||||
bool succ_empty() const { return Successors.empty(); }
|
||||
|
||||
inline iterator_range<pred_iterator> predecessors() {
|
||||
return iterator_range<pred_iterator>(pred_begin(), pred_end());
|
||||
}
|
||||
inline iterator_range<const_pred_iterator> const_predecessors() const {
|
||||
return iterator_range<const_pred_iterator>(pred_begin(), pred_end());
|
||||
}
|
||||
inline iterator_range<succ_iterator> succecessors() {
|
||||
return iterator_range<succ_iterator>(succ_begin(), succ_end());
|
||||
}
|
||||
inline iterator_range<const_succ_iterator> const_succecessors() const {
|
||||
return iterator_range<const_succ_iterator>(succ_begin(), succ_end());
|
||||
}
|
||||
|
||||
// LiveIn management methods.
|
||||
|
||||
/// addLiveIn - Add the specified register as a live in. Note that it
|
||||
|
Loading…
Reference in New Issue
Block a user