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

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 29 07:01:27 PST 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb76014a4f15a: RegionInfo: use a range-based for loop [NFCI] (authored by nhaehnle).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92932/new/

https://reviews.llvm.org/D92932

Files:
  llvm/include/llvm/Analysis/RegionInfoImpl.h


Index: llvm/include/llvm/Analysis/RegionInfoImpl.h
===================================================================
--- llvm/include/llvm/Analysis/RegionInfoImpl.h
+++ llvm/include/llvm/Analysis/RegionInfoImpl.h
@@ -585,10 +585,8 @@
   // 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;
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92932.313967.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201229/1378c540/attachment.bin>


More information about the llvm-commits mailing list