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 | 83ff184206a418387992109015ca83f220788f0d (patch) | |
tree | dff46dc97e321e54c85d252271e53fdf329c8ba4 /llvm | |
parent | 4534d2562ba3d15a433a992bec73893d23471fbb (diff) | |
download | bcm5719-llvm-83ff184206a418387992109015ca83f220788f0d.tar.gz bcm5719-llvm-83ff184206a418387992109015ca83f220788f0d.zip |
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.
llvm-svn: 74654
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/VMCore/PassManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/PassManager.cpp b/llvm/lib/VMCore/PassManager.cpp index 78fc28ec111..46f1243e121 100644 --- a/llvm/lib/VMCore/PassManager.cpp +++ b/llvm/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); } } |