[llvm-commits] [llvm] r53171 - /llvm/trunk/include/llvm/ADT/ImmutableMap.h

Ted Kremenek kremenek at apple.com
Mon Jul 7 09:20:55 PDT 2008


Author: kremenek
Date: Mon Jul  7 11:20:55 2008
New Revision: 53171

URL: http://llvm.org/viewvc/llvm-project?rev=53171&view=rev
Log:
Removed ImmutableMap::SlimFind and replaced it with ImmutableMap::lookup.  The new method does the same thing, except that it returns a pointer to the mapped data type, and not to an internal tree node.

Modified:
    llvm/trunk/include/llvm/ADT/ImmutableMap.h

Modified: llvm/trunk/include/llvm/ADT/ImmutableMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableMap.h?rev=53171&r1=53170&r2=53171&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableMap.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableMap.h Mon Jul  7 11:20:55 2008
@@ -194,17 +194,15 @@
   iterator begin() const { return iterator(Root); }
   iterator end() const { return iterator(); }  
   
-  TreeTy* SlimFind(key_type_ref K) const {
+  data_type* lookup(key_type_ref K) const {
     if (Root) {
       TreeTy* T = Root->find(K);
-      if (T) return T;
+      if (T) return &T->getValue().second;
     }
     
-    return NULL;
+    return 0;
   }
   
-  // FIXME: Add 'find' that returns an iterator instead of a TreeTy*.
-  
   //===--------------------------------------------------===//    
   // Utility methods.
   //===--------------------------------------------------===//  





More information about the llvm-commits mailing list