diff options
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r-- | llvm/lib/IR/LegacyPassManager.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index bb2661d..8fd35ef 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -675,11 +675,9 @@ PMTopLevelManager::setLastUser(ArrayRef<Pass*> AnalysisPasses, Pass *P) { // If AP is the last user of other passes then make P last user of // such passes. - for (auto LU : LastUser) { + for (auto &LU : LastUser) { if (LU.second == AP) - // DenseMap iterator is not invalidated here because - // this is just updating existing entries. - LastUser[LU.first] = P; + LU.second = P; } } } |