diff options
author | Dan Gohman <gohman@apple.com> | 2008-07-11 20:58:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-07-11 20:58:19 +0000 |
commit | b261a98997b7b93e6baffc418f7320873a709d7e (patch) | |
tree | 5dee06a8e718f8d3340454f695d3e6ba79acb1dc /lib/Transforms/IPO/GlobalDCE.cpp | |
parent | dc4ac473d31d85958aa22f78314109082502922f (diff) | |
download | external_llvm-b261a98997b7b93e6baffc418f7320873a709d7e.zip external_llvm-b261a98997b7b93e6baffc418f7320873a709d7e.tar.gz external_llvm-b261a98997b7b93e6baffc418f7320873a709d7e.tar.bz2 |
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/GlobalDCE.cpp')
-rw-r--r-- | lib/Transforms/IPO/GlobalDCE.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index 98202eb..608705b 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); |