[polly] r238294 - Drop const in front of iterator

Tobias Grosser tobias at grosser.es
Tue May 26 23:51:34 PDT 2015


Author: grosser
Date: Wed May 27 01:51:34 2015
New Revision: 238294

URL: http://llvm.org/viewvc/llvm-project?rev=238294&view=rev
Log:
Drop const in front of iterator

David Blaikie:

"find returns an iterator by value, so it's just added complexity/strangeness to
then use reference lifetime extension to give it the same semantics as if you'd
used a value type instead of a reference type."

Modified:
    polly/trunk/lib/Analysis/ScopInfo.cpp

Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=238294&r1=238293&r2=238294&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Wed May 27 01:51:34 2015
@@ -2021,7 +2021,7 @@ void Scop::buildScop(TempScop &tempScop,
 }
 
 ScopStmt *Scop::getStmtForBasicBlock(BasicBlock *BB) const {
-  const auto StmtMapIt = StmtMap.find(BB);
+  auto StmtMapIt = StmtMap.find(BB);
   if (StmtMapIt == StmtMap.end())
     return nullptr;
   return StmtMapIt->second;





More information about the llvm-commits mailing list