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/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 9abfe6f..c9ab809 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -39,11 +39,12 @@
 }
 
 
-GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx)
+GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx,
+                           LiveVariables& L)
   : CoreEngine(cfg, CD, Ctx, *this), 
     G(CoreEngine.getGraph()),
     Parents(0),
-    Liveness(G.getCFG()),
+    Liveness(L),
     Builder(NULL),
     StateMgr(G.getContext(), G.getAllocator()),
     BasicVals(StateMgr.getBasicValueFactory()),
@@ -51,12 +52,7 @@
     SymMgr(StateMgr.getSymbolManager()),
     CurrentStmt(NULL),
   NSExceptionII(NULL), NSExceptionInstanceRaiseSelectors(NULL),
-  RaiseSel(GetNullarySelector("raise", G.getContext())) {
-  
-  // Compute liveness information.
-  Liveness.runOnCFG(G.getCFG());
-  Liveness.runOnAllBlocks(G.getCFG(), NULL, true);
-}
+  RaiseSel(GetNullarySelector("raise", G.getContext())) {}
 
 GRExprEngine::~GRExprEngine() {    
   for (BugTypeSet::iterator I = BugTypes.begin(), E = BugTypes.end(); I!=E; ++I)