aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-07-07 16:20:55 +0000
committerTed Kremenek <kremenek@apple.com>2008-07-07 16:20:55 +0000
commitc315d58dcbdea638a42c5f939001c20b75b72b81 (patch)
treea12d56f4f85e71f16ed187bdfb0e0db8bde3f622 /include/llvm/ADT
parent18a1ab1d6b0f8e6ae6d85b922e27b5467ef444e6 (diff)
downloadexternal_llvm-c315d58dcbdea638a42c5f939001c20b75b72b81.tar.gz
external_llvm-c315d58dcbdea638a42c5f939001c20b75b72b81.tar.bz2
external_llvm-c315d58dcbdea638a42c5f939001c20b75b72b81.zip
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/ImmutableMap.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h
index 6a551db690..ae2a335942 100644
--- a/include/llvm/ADT/ImmutableMap.h
+++ b/include/llvm/ADT/ImmutableMap.h
@@ -194,17 +194,15 @@ public:
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.
//===--------------------------------------------------===//