aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-01-26 20:30:51 +0000
committerJim Laskey <jlaskey@mac.com>2006-01-26 20:30:51 +0000
commit3e0be526bfaafeb68b8ce38aa50b1b0f1598fc03 (patch)
treef8f3b56209d36c800f63f1dfb08fdcaae172507b
parentbc9ae377d9880a0257b9a5aaeac9b1691cc47398 (diff)
downloadexternal_llvm-3e0be526bfaafeb68b8ce38aa50b1b0f1598fc03.zip
external_llvm-3e0be526bfaafeb68b8ce38aa50b1b0f1598fc03.tar.gz
external_llvm-3e0be526bfaafeb68b8ce38aa50b1b0f1598fc03.tar.bz2
Use find instead of lower_bounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25657 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/UniqueVector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/UniqueVector.h b/include/llvm/ADT/UniqueVector.h
index e888678..93a9b1c 100644
--- a/include/llvm/ADT/UniqueVector.h
+++ b/include/llvm/ADT/UniqueVector.h
@@ -56,10 +56,10 @@ public:
/// not found.
unsigned idFor(const T &Entry) const {
// Search for entry in the map.
- typename std::map<T, unsigned>::iterator MI = Map.lower_bound(Entry);
+ typename std::map<T, unsigned>::iterator MI = Map.find(Entry);
// See if entry exists, if so return ID.
- if (MI != Map.end() && MI->first == Entry) return MI->second;
+ if (MI != Map.end()) return MI->second;
// No luck.
return 0;