summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/ScopGraphPrinter.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2014-03-03 13:13:55 +0000
committerTobias Grosser <tobias@grosser.es>2014-03-03 13:13:55 +0000
commit1d191909a82f4a62fef7ba8aca308f500ef6aede (patch)
tree9483646bb811137e55c79db624c26c7be02ca76d /polly/lib/Analysis/ScopGraphPrinter.cpp
parent43e978234a8cd8a70769125713d455434b72e353 (diff)
downloadbcm5719-llvm-1d191909a82f4a62fef7ba8aca308f500ef6aede.tar.gz
bcm5719-llvm-1d191909a82f4a62fef7ba8aca308f500ef6aede.zip
[C++11] Use foreach iterator for blocks and operands
llvm-svn: 202707
Diffstat (limited to 'polly/lib/Analysis/ScopGraphPrinter.cpp')
-rw-r--r--polly/lib/Analysis/ScopGraphPrinter.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/polly/lib/Analysis/ScopGraphPrinter.cpp b/polly/lib/Analysis/ScopGraphPrinter.cpp
index ab87d2678b2..ee15b2cfeac 100644
--- a/polly/lib/Analysis/ScopGraphPrinter.cpp
+++ b/polly/lib/Analysis/ScopGraphPrinter.cpp
@@ -139,18 +139,16 @@ struct DOTGraphTraits<ScopDetection *> : public DOTGraphTraits<RegionNode *> {
O.indent(2 * (depth + 1)) << "color = " << color << "\n";
}
- for (Region::const_iterator RI = R->begin(), RE = R->end(); RI != RE; ++RI)
- printRegionCluster(SD, *RI, O, depth + 1);
+ for (const auto &SubRegion : *R)
+ printRegionCluster(SD, SubRegion, O, depth + 1);
RegionInfo *RI = R->getRegionInfo();
- for (Region::const_block_iterator BI = R->block_begin(),
- BE = R->block_end();
- BI != BE; ++BI)
- if (RI->getRegionFor(*BI) == R)
+ for (const auto &BB : R->blocks())
+ if (RI->getRegionFor(BB) == R)
O.indent(2 * (depth + 1))
<< "Node"
- << static_cast<void *>(RI->getTopLevelRegion()->getBBNode(*BI))
+ << static_cast<void *>(RI->getTopLevelRegion()->getBBNode(BB))
<< ";\n";
O.indent(2 * depth) << "}\n";
OpenPOWER on IntegriCloud