RegionInfo: use a range-based for loop [NFCI]

Change-Id: I9985d72191a2b0680195032acf8a14ad2ba954ed

Differential Revision: https://reviews.llvm.org/D92932
This commit is contained in:
Nicolai Hähnle 2020-12-09 09:54:54 +01:00
parent 374ef57f13
commit b76014a4f1
1 changed files with 2 additions and 4 deletions

View File

@ -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, // Exit is the header of a loop that contains the entry. In this case,
// the dominance frontier must only contain the exit. // the dominance frontier must only contain the exit.
if (!DT->dominates(entry, exit)) { if (!DT->dominates(entry, exit)) {
for (typename DST::iterator SI = entrySuccs->begin(), for (BlockT *successor : *entrySuccs) {
SE = entrySuccs->end(); if (successor != exit && successor != entry)
SI != SE; ++SI) {
if (*SI != exit && *SI != entry)
return false; return false;
} }