summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringMap.h
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-01-04 20:45:14 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-01-04 20:45:14 +0000
commit85c07ce0481daa8f462943f621efdb7f21f6d3ef (patch)
tree54c3c39bde0c91b0a2b8f37bc7b1fdc95c94a201 /include/llvm/ADT/StringMap.h
parent34b5f0437b9bf67bcbeb166a1c092dbbe3786157 (diff)
downloadllvm-85c07ce0481daa8f462943f621efdb7f21f6d3ef.tar.gz
llvm-85c07ce0481daa8f462943f621efdb7f21f6d3ef.tar.bz2
llvm-85c07ce0481daa8f462943f621efdb7f21f6d3ef.tar.xz
StringMap.find never points to an empty bucket or tombstone, skip the check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/StringMap.h')
-rw-r--r--include/llvm/ADT/StringMap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h
index d2a65d0abc..e034f38eec 100644
--- a/include/llvm/ADT/StringMap.h
+++ b/include/llvm/ADT/StringMap.h
@@ -280,13 +280,13 @@ public:
iterator find(StringRef Key) {
int Bucket = FindKey(Key);
if (Bucket == -1) return end();
- return iterator(TheTable+Bucket);
+ return iterator(TheTable+Bucket, true);
}
const_iterator find(StringRef Key) const {
int Bucket = FindKey(Key);
if (Bucket == -1) return end();
- return const_iterator(TheTable+Bucket);
+ return const_iterator(TheTable+Bucket, true);
}
/// lookup - Return the entry for the specified key, or a default