aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
index 785c286137..1c81af9586 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h
@@ -25,7 +25,6 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/DenseSet.h"
#include "llvm/Support/Allocator.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/GraphTraits.h"
@@ -241,7 +240,6 @@ public:
class ExplodedGraph {
protected:
friend class CoreEngine;
- friend class ExplodedNode;
// Type definitions.
typedef std::vector<ExplodedNode *> NodeVector;
@@ -267,13 +265,16 @@ protected:
unsigned NumNodes;
/// A list of recently allocated nodes that can potentially be recycled.
- llvm::DenseSet<ExplodedNode*> ChangedNodes;
+ NodeVector ChangedNodes;
/// A list of nodes that can be reused.
NodeVector FreeNodes;
/// A flag that indicates whether nodes should be recycled.
bool reclaimNodes;
+
+ /// Counter to determine when to reclaim nodes.
+ unsigned reclaimCounter;
public:
@@ -360,12 +361,12 @@ public:
llvm::DenseMap<const void*, const void*> *InverseMap) const;
/// Enable tracking of recently allocated nodes for potential reclamation
- /// when calling reclaimChangedNodes().
+ /// when calling reclaimRecentlyAllocatedNodes().
void enableNodeReclamation() { reclaimNodes = true; }
/// Reclaim "uninteresting" nodes created since the last time this method
/// was called.
- void reclaimChangedNodes();
+ void reclaimRecentlyAllocatedNodes();
private:
bool shouldCollect(const ExplodedNode *node);