]> granicus.if.org Git - clang/commitdiff
ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.
authorTed Kremenek <kremenek@apple.com>
Tue, 5 Feb 2008 05:15:51 +0000 (05:15 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 5 Feb 2008 05:15:51 +0000 (05:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46740 91177308-0d34-0410-b5e6-96231b3b80d8

Analysis/GRConstants.cpp
Analysis/RValues.h
Analysis/ValueState.h
include/clang/Analysis/PathSensitive/ExplodedGraph.h

index 4c678914ef44dc1a493812adeb884928a59a0b9e..1143ad2a25ab33568e88f20bc2b93d5834098a65 100644 (file)
@@ -131,7 +131,7 @@ protected:
 public:
   GRConstants(GraphTy& g) : G(g), Liveness(G.getCFG(), G.getFunctionDecl()),
       Builder(NULL),
-      StateMgr(G.getContext()),
+      StateMgr(G.getContext(), G.getAllocator()),
       ValMgr(StateMgr.getValueManager()),
       SymMgr(StateMgr.getSymbolManager()),
       StmtEntryNode(NULL), CurrentStmt(NULL) {
index 79202da545ac3a5764e80f38535d72c854c17d57..9048c6753ae1cc0eece305bc2e1ca9193cd3887a 100644 (file)
@@ -89,10 +89,12 @@ class ValueManager {
   
   ASTContext& Ctx;
   APSIntSetTy APSIntSet;
-  llvm::BumpPtrAllocator BPAlloc;
+  llvm::BumpPtrAllocator& BPAlloc;
   
 public:
-  ValueManager(ASTContext& ctx) : Ctx(ctx) {}
+  ValueManager(ASTContext& ctx, llvm::BumpPtrAllocator& Alloc) 
+    : Ctx(ctx), BPAlloc(Alloc) {}
+  
   ~ValueManager();
   
   ASTContext& getContext() const { return Ctx; }  
index ccbc6dd3c894dbc5437cbe8df5c855706d401b22..c686a48f20ef3d321e7d9e13c94c9ca212a3293d 100644 (file)
@@ -141,7 +141,8 @@ private:
   SymbolManager SymMgr;
   
 public:  
-  ValueStateManager(ASTContext& Ctx) : ValMgr(Ctx) {}
+  ValueStateManager(ASTContext& Ctx, llvm::BumpPtrAllocator& Alloc) 
+    : ValMgr(Ctx, Alloc) {}
   
   StateTy getInitialState() {
     return Factory.GetEmptyMap();
index e69acda3e3748933fea3af5a916610458b4b57e4..dcc833c0dff85e3d116bbb7030408d2e102993a7 100644 (file)
@@ -254,6 +254,7 @@ public:
   unsigned num_roots() const { return Roots.size(); }
   unsigned num_eops() const { return EndNodes.size(); }
   
+  llvm::BumpPtrAllocator& getAllocator() { return Allocator; }
   CFG& getCFG() { return cfg; }
   ASTContext& getContext() { return Ctx; }
   FunctionDecl& getFunctionDecl() { return FD; }