GRExprEngine now expects the LiveVariables information to be provided by its creator.
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53046 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/AnalysisConsumer.cpp b/Driver/AnalysisConsumer.cpp
index 1e33ae1..65a3dae 100644
--- a/Driver/AnalysisConsumer.cpp
+++ b/Driver/AnalysisConsumer.cpp
@@ -154,6 +154,7 @@
if (!liveness) {
liveness.reset(new LiveVariables(*getCFG()));
liveness->runOnCFG(*getCFG());
+ liveness->runOnAllBlocks(*getCFG(), 0, true);
}
return liveness.get();
}
@@ -284,7 +285,8 @@
mgr.DisplayFunction();
// Construct the analysis engine.
- GRExprEngine Eng(*mgr.getCFG(), *mgr.getCodeDecl(), mgr.getContext());
+ GRExprEngine Eng(*mgr.getCFG(), *mgr.getCodeDecl(), mgr.getContext(),
+ *mgr.getLiveVariables());
Eng.setTransferFunctions(tf);
// Execute the worklist algorithm.