diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -410,6 +410,19 @@ virtual ~VPBlockBase() = default; + using pred_iterator = SmallVectorImpl::iterator; + using const_pred_iterator = SmallVectorImpl::const_iterator; + using succ_iterator = SmallVectorImpl::iterator; + using const_succ_iterator = SmallVectorImpl::const_iterator; + pred_iterator pred_begin() { return Predecessors.begin(); } + const_pred_iterator pred_begin() const { return Predecessors.begin(); } + pred_iterator pred_end() { return Predecessors.end(); } + const_pred_iterator pred_end() const { return Predecessors.end(); } + succ_iterator succ_begin() { return Successors.begin(); } + const_succ_iterator succ_begin() const { return Successors.begin(); } + succ_iterator succ_end() { return Successors.end(); } + const_succ_iterator succ_end() const { return Successors.end(); } + const std::string &getName() const { return Name; } void setName(const Twine &newName) { Name = newName.str(); }