From: Davide Italiano Date: Thu, 14 May 2015 21:52:12 +0000 (+0000) Subject: Don't rely on implicit pointerness of 'auto'. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=42d0f8304e6b66d71f62701290628eb1378e57de;p=oota-llvm.git Don't rely on implicit pointerness of 'auto'. 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 --- diff --git a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index 9bc0153bf51..a4806c20efc 100644 --- a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -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;