blockfreq: Stop using range-based for to traverse Loops
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 25 Apr 2014 04:37:58 +0000 (04:37 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 25 Apr 2014 04:37:58 +0000 (04:37 +0000)
A follow-up commit will need the actual iterators.

<rdar://problem/14292693>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207178 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/BlockFrequencyInfoImpl.h

index 310b23f0ea4c5620bcf674bac91b392cb58f106b..78f7e8414254dcc39afaf0aed0dd3df9dc0c1f64 100644 (file)
@@ -1471,8 +1471,8 @@ template <class BT> void BlockFrequencyInfoImpl<BT>::initializeLoops() {
 
 template <class BT> void BlockFrequencyInfoImpl<BT>::computeMassInLoops() {
   // Visit loops with the deepest first, and the top-level loops last.
-  for (const auto &L : make_range(Loops.rbegin(), Loops.rend()))
-    computeMassInLoop(L.Header);
+  for (auto L = Loops.rbegin(), E = Loops.rend(); L != E; ++L)
+    computeMassInLoop(L->Header);
 }
 
 template <class BT>