summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/PassManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/PassManager.cpp')
-rw-r--r--llvm/lib/IR/PassManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/PassManager.cpp b/llvm/lib/IR/PassManager.cpp
index a5f407c00e8..f55db9c1e64 100644
--- a/llvm/lib/IR/PassManager.cpp
+++ b/llvm/lib/IR/PassManager.cpp
@@ -22,6 +22,10 @@ FunctionAnalysisManagerModuleProxy::run(Module &M) {
}
FunctionAnalysisManagerModuleProxy::Result::~Result() {
+ // FAM is cleared in a moved from state where there is nothing to do.
+ if (!FAM)
+ return;
+
// Clear out the analysis manager if we're being destroyed -- it means we
// didn't even see an invalidate call when we got invalidated.
FAM->clear();
OpenPOWER on IntegriCloud