[cfe-commits] r46740 - in /cfe/trunk: Analysis/GRConstants.cpp Analysis/RValues.h Analysis/ValueState.h include/clang/Analysis/PathSensitive/ExplodedGraph.h

Ted Kremenek kremenek at apple.com
Mon Feb 4 21:15:51 PST 2008


Author: kremenek
Date: Mon Feb  4 23:15:51 2008
New Revision: 46740

URL: http://llvm.org/viewvc/llvm-project?rev=46740&view=rev
Log:
ValueManager now uses the BumpPtrAllocator owned by the ExplodedGraph.

Modified:
    cfe/trunk/Analysis/GRConstants.cpp
    cfe/trunk/Analysis/RValues.h
    cfe/trunk/Analysis/ValueState.h
    cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h

Modified: cfe/trunk/Analysis/GRConstants.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRConstants.cpp?rev=46740&r1=46739&r2=46740&view=diff

==============================================================================
--- cfe/trunk/Analysis/GRConstants.cpp (original)
+++ cfe/trunk/Analysis/GRConstants.cpp Mon Feb  4 23:15:51 2008
@@ -131,7 +131,7 @@
 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) {

Modified: cfe/trunk/Analysis/RValues.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/RValues.h?rev=46740&r1=46739&r2=46740&view=diff

==============================================================================
--- cfe/trunk/Analysis/RValues.h (original)
+++ cfe/trunk/Analysis/RValues.h Mon Feb  4 23:15:51 2008
@@ -89,10 +89,12 @@
   
   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; }  

Modified: cfe/trunk/Analysis/ValueState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/ValueState.h?rev=46740&r1=46739&r2=46740&view=diff

==============================================================================
--- cfe/trunk/Analysis/ValueState.h (original)
+++ cfe/trunk/Analysis/ValueState.h Mon Feb  4 23:15:51 2008
@@ -141,7 +141,8 @@
   SymbolManager SymMgr;
   
 public:  
-  ValueStateManager(ASTContext& Ctx) : ValMgr(Ctx) {}
+  ValueStateManager(ASTContext& Ctx, llvm::BumpPtrAllocator& Alloc) 
+    : ValMgr(Ctx, Alloc) {}
   
   StateTy getInitialState() {
     return Factory.GetEmptyMap();

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h?rev=46740&r1=46739&r2=46740&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/ExplodedGraph.h Mon Feb  4 23:15:51 2008
@@ -254,6 +254,7 @@
   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; }





More information about the cfe-commits mailing list