Don't rely on implicit pointerness of 'auto'.
authorDavide Italiano <davide@freebsd.org>
Thu, 14 May 2015 21:52:12 +0000 (21:52 +0000)
committerDavide Italiano <davide@freebsd.org>
Thu, 14 May 2015 21:52:12 +0000 (21:52 +0000)
This ends up being a copy. Pointy hat to me.
Reported by: dexonsmith, dblaikie

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

lib/Transforms/Scalar/LoopIdiomRecognize.cpp

index 9bc0153..a4806c2 100644 (file)
@@ -639,7 +639,7 @@ bool LoopIdiomRecognize::runOnCountableLoop() {
 
   bool MadeChange = false;
   // Scan all the blocks in the loop that are not in subloops.
-  for (auto BB : CurLoop->getBlocks()) {
+  for (auto *BB : CurLoop->getBlocks()) {
     // Ignore blocks in subloops.
     if (LI.getLoopFor(BB) != CurLoop)
       continue;