summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/BlockGenerators.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen/BlockGenerators.cpp')
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 8ef26557b47..a18640911b4 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -1455,6 +1455,6 @@ void RegionGenerator::copyPHIInstruction(ScopStmt &Stmt, PHINode *PHI,
PHICopy->moveBefore(PHICopy->getParent()->getFirstNonPHI());
BBMap[PHI] = PHICopy;
- for (unsigned u = 0; u < NumIncoming; u++)
- addOperandToPHI(Stmt, PHI, PHICopy, PHI->getIncomingBlock(u), LTS);
+ for (BasicBlock *IncomingBB : PHI->blocks())
+ addOperandToPHI(Stmt, PHI, PHICopy, IncomingBB, LTS);
}
OpenPOWER on IntegriCloud