summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-11 20:58:19 +0000
committerDan Gohman <gohman@apple.com>2008-07-11 20:58:19 +0000
commitc418bf3dd593b5b2fe2f978930f6d0d6b17e344e (patch)
tree5dee06a8e718f8d3340454f695d3e6ba79acb1dc /lib/Transforms/IPO
parent78d60458d558877a5bf7e326511e302bcf75b8ee (diff)
downloadllvm-c418bf3dd593b5b2fe2f978930f6d0d6b17e344e.tar.gz
llvm-c418bf3dd593b5b2fe2f978930f6d0d6b17e344e.tar.bz2
llvm-c418bf3dd593b5b2fe2f978930f6d0d6b17e344e.tar.xz
Use find instead of lower_bound.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index 98202eb0b3..608705b10a 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -134,10 +134,10 @@ bool GlobalDCE::runOnModule(Module &M) {
/// MarkGlobalIsNeeded - the specific global value as needed, and
/// recursively mark anything that it uses as also needed.
void GlobalDCE::GlobalIsNeeded(GlobalValue *G) {
- std::set<GlobalValue*>::iterator I = AliveGlobals.lower_bound(G);
+ std::set<GlobalValue*>::iterator I = AliveGlobals.find(G);
// If the global is already in the set, no need to reprocess it.
- if (I != AliveGlobals.end() && *I == G) return;
+ if (I != AliveGlobals.end()) return;
// Otherwise insert it now, so we do not infinitely recurse
AliveGlobals.insert(I, G);