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 | c418bf3dd593b5b2fe2f978930f6d0d6b17e344e (patch) | |
tree | 5dee06a8e718f8d3340454f695d3e6ba79acb1dc /lib/Support/Timer.cpp | |
parent | 78d60458d558877a5bf7e326511e302bcf75b8ee (diff) |
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/Support/Timer.cpp')
-rw-r--r-- | lib/Support/Timer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/Timer.cpp b/lib/Support/Timer.cpp index c8678d3ae2..29fd00c0a3 100644 --- a/lib/Support/Timer.cpp +++ b/lib/Support/Timer.cpp @@ -185,8 +185,8 @@ void Timer::addPeakMemoryMeasurement() { static ManagedStatic<std::map<std::string, Timer> > NamedTimers; static Timer &getNamedRegionTimer(const std::string &Name) { - std::map<std::string, Timer>::iterator I = NamedTimers->lower_bound(Name); - if (I != NamedTimers->end() && I->first == Name) + std::map<std::string, Timer>::iterator I = NamedTimers->find(Name); + if (I != NamedTimers->end()) return I->second; return NamedTimers->insert(I, std::make_pair(Name, Timer(Name)))->second; |