Author: Nicolai Hähnle Date: 2020-12-29T16:00:26+01:00 New Revision: b76014a4f15ad9f3151862fcc6c6ab2f0f505199
URL: https://github.com/llvm/llvm-project/commit/b76014a4f15ad9f3151862fcc6c6ab2f0f505199 DIFF: https://github.com/llvm/llvm-project/commit/b76014a4f15ad9f3151862fcc6c6ab2f0f505199.diff LOG: RegionInfo: use a range-based for loop [NFCI] Change-Id: I9985d72191a2b0680195032acf8a14ad2ba954ed Differential Revision: https://reviews.llvm.org/D92932 Added: Modified: llvm/include/llvm/Analysis/RegionInfoImpl.h Removed: ################################################################################ diff --git a/llvm/include/llvm/Analysis/RegionInfoImpl.h b/llvm/include/llvm/Analysis/RegionInfoImpl.h index 8d9ec646f519..bbd3dd5dc0ea 100644 --- a/llvm/include/llvm/Analysis/RegionInfoImpl.h +++ b/llvm/include/llvm/Analysis/RegionInfoImpl.h @@ -585,10 +585,8 @@ bool RegionInfoBase<Tr>::isRegion(BlockT *entry, BlockT *exit) const { // Exit is the header of a loop that contains the entry. In this case, // the dominance frontier must only contain the exit. if (!DT->dominates(entry, exit)) { - for (typename DST::iterator SI = entrySuccs->begin(), - SE = entrySuccs->end(); - SI != SE; ++SI) { - if (*SI != exit && *SI != entry) + for (BlockT *successor : *entrySuccs) { + if (successor != exit && successor != entry) return false; } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits