]> granicus.if.org Git - llvm/commitdiff
ScopedHashTable lookup should be const
authorDaniel Berlin <dberlin@dberlin.org>
Tue, 31 Jan 2017 22:01:08 +0000 (22:01 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Tue, 31 Jan 2017 22:01:08 +0000 (22:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293695 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/ScopedHashTable.h

index ad805b0991c144a9dcec85197363ac1ceb2fbe7b..d52128e294a32690ba6dfd8908ccfa481222663a 100644 (file)
@@ -182,8 +182,8 @@ public:
     return TopLevelMap.count(Key);
   }
 
-  V lookup(const K &Key) {
-    typename DenseMap<K, ValTy*, KInfo>::iterator I = TopLevelMap.find(Key);
+  V lookup(const K &Key) const {
+    auto I = TopLevelMap.find(Key);
     if (I != TopLevelMap.end())
       return I->second->getValue();