diff --git a/lib/IR/PassManager.cpp b/lib/IR/PassManager.cpp index 17f6fbcf546..3344b099537 100644 --- a/lib/IR/PassManager.cpp +++ b/lib/IR/PassManager.cpp @@ -165,6 +165,8 @@ void FunctionAnalysisManager::invalidateImpl(Function *F, while (!InvalidatedPassIDs.empty()) FunctionAnalysisResults.erase( std::make_pair(InvalidatedPassIDs.pop_back_val(), F)); + if (ResultsList.empty()) + FunctionAnalysisResultLists.erase(F); } char FunctionAnalysisManagerModuleProxy::PassID;