diff options
-rw-r--r-- | Analysis/GRConstants.cpp | 2 | ||||
-rw-r--r-- | Analysis/RValues.h | 6 | ||||
-rw-r--r-- | Analysis/ValueState.h | 3 | ||||
-rw-r--r-- | include/clang/Analysis/PathSensitive/ExplodedGraph.h | 1 |
4 files changed, 8 insertions, 4 deletions
diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp index 4c678914ef..1143ad2a25 100644 --- a/Analysis/GRConstants.cpp +++ b/Analysis/GRConstants.cpp @@ -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) { diff --git a/Analysis/RValues.h b/Analysis/RValues.h index 79202da545..9048c6753a 100644 --- a/Analysis/RValues.h +++ b/Analysis/RValues.h @@ -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; } diff --git a/Analysis/ValueState.h b/Analysis/ValueState.h index ccbc6dd3c8..c686a48f20 100644 --- a/Analysis/ValueState.h +++ b/Analysis/ValueState.h @@ -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(); diff --git a/include/clang/Analysis/PathSensitive/ExplodedGraph.h b/include/clang/Analysis/PathSensitive/ExplodedGraph.h index e69acda3e3..dcc833c0df 100644 --- a/include/clang/Analysis/PathSensitive/ExplodedGraph.h +++ b/include/clang/Analysis/PathSensitive/ExplodedGraph.h @@ -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; } |