]> granicus.if.org Git - clang/commitdiff
Fix clang's use of DenseMap iterators after r86636 fixed their constness.
authorJeffrey Yasskin <jyasskin@google.com>
Tue, 10 Nov 2009 01:17:45 +0000 (01:17 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Tue, 10 Nov 2009 01:17:45 +0000 (01:17 +0000)
Patch by Victor Zverovich!

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

lib/AST/ASTContext.cpp
lib/Analysis/ExplodedGraph.cpp
lib/Analysis/GRExprEngine.cpp
lib/Analysis/LiveVariables.cpp
lib/Analysis/RegionStore.cpp
lib/CodeGen/CodeGenTypes.cpp

index a6b0dfbaf49f568a29c8588755e7b3f88aca7180..bb3559b50f2bd1aae768a73e171cb9964d57809a 100644 (file)
@@ -258,7 +258,7 @@ ASTContext::setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl,
 
 UnresolvedUsingDecl *
 ASTContext::getInstantiatedFromUnresolvedUsingDecl(UsingDecl *UUD) {
-  llvm::DenseMap<UsingDecl *, UnresolvedUsingDecl *>::iterator Pos
+  llvm::DenseMap<UsingDecl *, UnresolvedUsingDecl *>::const_iterator Pos
     = InstantiatedFromUnresolvedUsingDecl.find(UUD);
   if (Pos == InstantiatedFromUnresolvedUsingDecl.end())
     return 0;
index 0dc81a4225a8ba5e50b5dccdc773b7e8361cba14..3b339ffc0dfe2c3bec4c88c6807b2c484bdc6e25 100644 (file)
@@ -273,7 +273,7 @@ ExplodedGraph::TrimInternal(const ExplodedNode* const* BeginSources,
 
 ExplodedNode*
 InterExplodedGraphMap::getMappedNode(const ExplodedNode* N) const {
-  llvm::DenseMap<const ExplodedNode*, ExplodedNode*>::iterator I =
+  llvm::DenseMap<const ExplodedNode*, ExplodedNode*>::const_iterator I =
     M.find(N);
 
   return I == M.end() ? 0 : I->second;
index 7dbb08515376e456ce90bf2f674767b54e0ba500..528a469286cb515fd5f3fb61d1725aa84587fe3d 100644 (file)
@@ -2841,7 +2841,7 @@ void GRExprEngine::VisitBinaryOperator(BinaryOperator* B,
 //===----------------------------------------------------------------------===//
 
 Checker *GRExprEngine::lookupChecker(void *tag) const {
-  CheckerMap::iterator I = CheckerM.find(tag);
+  CheckerMap::const_iterator I = CheckerM.find(tag);
   return (I == CheckerM.end()) ? NULL : Checkers[I->second].second;
 }
 
index 070481fa146ddf0220e7b2b9a261e0f20c72bb09..2510445a7f3119bfb123397e34c484ed8e7c87db 100644 (file)
@@ -346,7 +346,7 @@ void LiveVariables::dumpLiveness(const ValTy& V, const SourceManager& SM) const
 }
 
 void LiveVariables::dumpBlockLiveness(const SourceManager& M) const {
-  for (BlockDataMapTy::iterator I = getBlockDataMap().begin(),
+  for (BlockDataMapTy::const_iterator I = getBlockDataMap().begin(),
        E = getBlockDataMap().end(); I!=E; ++I) {
     llvm::errs() << "\n[ B" << I->first->getBlockID()
                  << " (live variables at block exit) ]\n";
index 45c42281ab2c1582872a5a7df793ba38ed69e42e..8106260f18f053e4da5478020af4b7e9b5a18b71 100644 (file)
@@ -164,7 +164,7 @@ public:
   ~RegionStoreSubRegionMap() {}
 
   bool iterSubRegions(const MemRegion* Parent, Visitor& V) const {
-    Map::iterator I = M.find(Parent);
+    Map::const_iterator I = M.find(Parent);
 
     if (I == M.end())
       return true;
index d43d13e26bbb2d57ae25d69821eb197726f62686..1f83f37e04795b20282850d9e221cd38f256f7d0 100644 (file)
@@ -492,7 +492,7 @@ const CGRecordLayout &
 CodeGenTypes::getCGRecordLayout(const TagDecl *TD) const {
   const Type *Key =
     Context.getTagDeclType(TD).getTypePtr();
-  llvm::DenseMap<const Type*, CGRecordLayout *>::iterator I
+  llvm::DenseMap<const Type*, CGRecordLayout *>::const_iterator I
     = CGRecordLayouts.find(Key);
   assert (I != CGRecordLayouts.end()
           && "Unable to find record layout information for type");