diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-01 23:12:33 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-01 23:12:33 +0000 |
commit | 82c32c42724f92b899287b4f34029eb1170c43f9 (patch) | |
tree | 060795d42ef1970cbdd6b1e1c2e7d42760918503 /lib/VMCore/PassManager.cpp | |
parent | aa3943bf63618dce1a74eda1a81bcee7ee9c73f5 (diff) |
Use find instead of operator[] to test whether an element is in a std::map.
This fixes a bug that caused -debug-pass=Details to abort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 78fc28ec11..46f1243e12 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -278,8 +278,10 @@ public: for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) { ModulePass *MP = getContainedPass(Index); MP->dumpPassStructure(Offset + 1); - if (FunctionPassManagerImpl *FPP = OnTheFlyManagers[MP]) - FPP->dumpPassStructure(Offset + 2); + std::map<Pass *, FunctionPassManagerImpl *>::const_iterator I = + OnTheFlyManagers.find(MP); + if (I != OnTheFlyManagers.end()) + I->second->dumpPassStructure(Offset + 2); dumpLastUses(MP, Offset+1); } } |