[llvm] r237394 - Don't rely on implicit pointerness of 'auto'.

Davide Italiano davide at freebsd.org
Thu May 14 14:52:13 PDT 2015


Author: davide
Date: Thu May 14 16:52:12 2015
New Revision: 237394

URL: http://llvm.org/viewvc/llvm-project?rev=237394&view=rev
Log:
Don't rely on implicit pointerness of 'auto'. 

This ends up being a copy. Pointy hat to me.
Reported by: dexonsmith, dblaikie

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=237394&r1=237393&r2=237394&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Thu May 14 16:52:12 2015
@@ -639,7 +639,7 @@ bool LoopIdiomRecognize::runOnCountableL
 
   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;





More information about the llvm-commits mailing list