aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-31 02:14:24 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-01-31 02:14:24 +0000
commitb9b0f6fb6e113b5e6be3ed9754c4bf01186a17bf (patch)
treef5a6d058526dd31830d98cfcdbd144b499e8121f /lib/StaticAnalyzer/Core/ExprEngine.cpp
parent6e1d2eaa7d7f1008a5bac12f73fbf6167802a46d (diff)
Revert r149311 which failed to compile.
Original log: Convert ProgramStateRef to a smart pointer for managing the reference counts of ProgramStates. This leads to a slight memory improvement, and a simplification of the logic for managing ProgramState objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngine.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 5087ae1d33..2d047d2c46 100644
--- a/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -238,8 +238,13 @@ static bool shouldRemoveDeadBindings(AnalysisManager &AMgr,
void ExprEngine::ProcessStmt(const CFGStmt S,
ExplodedNode *Pred) {
+ // TODO: Use RAII to remove the unnecessary, tagged nodes.
+ //RegisterCreatedNodes registerCreatedNodes(getGraph());
+
// Reclaim any unnecessary nodes in the ExplodedGraph.
G.reclaimRecentlyAllocatedNodes();
+ // Recycle any unused states in the ProgramStateManager.
+ StateMgr.recycleUnusedStates();
currentStmt = S.getStmt();
PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
@@ -1851,7 +1856,7 @@ struct DOTGraphTraits<ExplodedNode*> :
}
ProgramStateRef state = N->getState();
- Out << "\\|StateID: " << (void*) state.getPtr()
+ Out << "\\|StateID: " << (void*) state
<< " NodeID: " << (void*) N << "\\|";
state->printDOT(Out);