summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/GRExprEngine.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-07-02 20:13:38 +0000
committerTed Kremenek <kremenek@apple.com>2008-07-02 20:13:38 +0000
commit125d4a3b2de29258dda8df9895039a699cea26e4 (patch)
tree89a5db5f3c44b5b85d0744b88dcdc7fe336f3f75 /clang/lib/Analysis/GRExprEngine.cpp
parentabfd3a816226d3071f203533cb01a26a7872711d (diff)
downloadbcm5719-llvm-125d4a3b2de29258dda8df9895039a699cea26e4.tar.gz
bcm5719-llvm-125d4a3b2de29258dda8df9895039a699cea26e4.zip
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
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r--clang/lib/Analysis/GRExprEngine.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp
index 9abfe6f79f3..c9ab8097bac 100644
--- a/clang/lib/Analysis/GRExprEngine.cpp
+++ b/clang/lib/Analysis/GRExprEngine.cpp
@@ -39,11 +39,12 @@ static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) {
}
-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 @@ GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx)
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)
OpenPOWER on IntegriCloud