[llvm] r293695 - ScopedHashTable lookup should be const
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 14:01:08 PST 2017
Author: dannyb
Date: Tue Jan 31 16:01:08 2017
New Revision: 293695
URL: http://llvm.org/viewvc/llvm-project?rev=293695&view=rev
Log:
ScopedHashTable lookup should be const
Modified:
llvm/trunk/include/llvm/ADT/ScopedHashTable.h
Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ScopedHashTable.h?rev=293695&r1=293694&r2=293695&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ScopedHashTable.h (original)
+++ llvm/trunk/include/llvm/ADT/ScopedHashTable.h Tue Jan 31 16:01:08 2017
@@ -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();
More information about the llvm-commits
mailing list