summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/PassManager.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-21 11:11:54 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-21 11:11:54 +0000
commitde37c467804f5c0f0e72bc960ded75a8dc53dd5b (patch)
tree5cfe81c28f928b886e383ff7cfa0ca5706ebaa24 /llvm/lib/IR/PassManager.cpp
parent54d9f88bed70d5bd79b223899a62f0530772a413 (diff)
downloadbcm5719-llvm-de37c467804f5c0f0e72bc960ded75a8dc53dd5b.tar.gz
bcm5719-llvm-de37c467804f5c0f0e72bc960ded75a8dc53dd5b.zip
[PM] Fix a bug where we didn't properly clear the list map when the list
became empty. This would manifest later as an assert failure due to a non-empty list map but an empty result map. This doesn't easily manifest with just the module pass manager and the function pass manager, but the next commit will add the CGSCC pass manager that hits this assert immediately. llvm-svn: 206744
Diffstat (limited to 'llvm/lib/IR/PassManager.cpp')
-rw-r--r--llvm/lib/IR/PassManager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp
index 17f6fbcf546..3344b099537 100644
--- a/llvm/lib/IR/PassManager.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud