summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-02-10 02:21:52 +0000
committerTed Kremenek <kremenek@apple.com>2011-02-10 02:21:52 +0000
commit75e45641402bf5a7766206c52fde2d6f93e584f6 (patch)
tree0dfd4f2bf03ecaf5232a69c18119ff217b5d2ce1 /clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
parentd4fcc0530422eb38bcca7d24b2649d6ef6cbb9b1 (diff)
downloadbcm5719-llvm-75e45641402bf5a7766206c52fde2d6f93e584f6.tar.gz
bcm5719-llvm-75e45641402bf5a7766206c52fde2d6f93e584f6.zip
static analyzer: Make GRStates reference counted, with reference counts managed by ExplodedNodes.
This reduces memory usage of the analyzer on sqlite by another 5%. llvm-svn: 125260
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
index 84fcacab63a..3ce50d65391 100644
--- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
@@ -123,6 +123,8 @@ void ExplodedGraph::reclaimRecentlyAllocatedNodes() {
freeNodes = new NodeList();
getNodeList(freeNodes)->push_back(node);
Nodes.RemoveNode(node);
+ --NumNodes;
+ node->~ExplodedNode();
}
nl.clear();
OpenPOWER on IntegriCloud