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.
llvm-svn: 53046
diff --git a/clang/Driver/AnalysisConsumer.cpp b/clang/Driver/AnalysisConsumer.cpp
index 1e33ae1..65a3dae 100644
--- a/clang/Driver/AnalysisConsumer.cpp
+++ b/clang/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.