summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit7fe302b558e7f26958e600d44f50c1b4cfe2fe5d (patch)
tree6128a1f0fcc65df2d76134977715722b0f4248ad /llvm
parent4ca4fd48d299ff4eb14e4d1a91b182b3d902f0ac (diff)
downloadbcm5719-llvm-7fe302b558e7f26958e600d44f50c1b4cfe2fe5d.tar.gz
bcm5719-llvm-7fe302b558e7f26958e600d44f50c1b4cfe2fe5d.zip
Use find instead of lower_bounds.
llvm-svn: 25657
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/UniqueVector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/UniqueVector.h b/llvm/include/llvm/ADT/UniqueVector.h
index e888678675e..93a9b1c6b50 100644
--- a/llvm/include/llvm/ADT/UniqueVector.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud