diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-17 06:19:58 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-08-17 06:19:58 +0000 |
commit | 5f078cb844b346bacaa9a028d8d68f5e5f3b7a7d (patch) | |
tree | d4c0fe24a54b65b4a8e63651e8d7c781103a13a1 /clang/lib/Analysis/BasicStore.cpp | |
parent | aa1526419c1c3c01bdbc42ffc7b7488f7bffd69d (diff) | |
download | bcm5719-llvm-5f078cb844b346bacaa9a028d8d68f5e5f3b7a7d.tar.gz bcm5719-llvm-5f078cb844b346bacaa9a028d8d68f5e5f3b7a7d.zip |
To make the analysis independent on the locally stored liveness and cfg
of GRStateManager and GRExprEngine, pass the initial location context
to the getInitialState() method.
llvm-svn: 79228
Diffstat (limited to 'clang/lib/Analysis/BasicStore.cpp')
-rw-r--r-- | clang/lib/Analysis/BasicStore.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp index b044d400ae7..aed5bdc66be 100644 --- a/clang/lib/Analysis/BasicStore.cpp +++ b/clang/lib/Analysis/BasicStore.cpp @@ -13,6 +13,7 @@ #include "clang/AST/ExprObjC.h" #include "clang/Analysis/Analyses/LiveVariables.h" +#include "clang/Analysis/PathSensitive/AnalysisContext.h" #include "clang/Analysis/PathSensitive/GRState.h" #include "llvm/ADT/ImmutableMap.h" #include "llvm/Support/Compiler.h" @@ -61,7 +62,7 @@ public: Store BindInternal(Store St, Loc loc, SVal V); Store Remove(Store St, Loc loc); - Store getInitialStore(); + Store getInitialStore(const LocationContext *InitLoc); // FIXME: Investigate what is using this. This method should be removed. virtual Loc getLoc(const VarDecl* VD) { @@ -488,12 +489,12 @@ Store BasicStoreManager::scanForIvars(Stmt *B, const Decl* SelfDecl, Store St) { return St; } -Store BasicStoreManager::getInitialStore() { +Store BasicStoreManager::getInitialStore(const LocationContext *InitLoc) { // The LiveVariables information already has a compilation of all VarDecls // used in the function. Iterate through this set, and "symbolicate" // any VarDecl whose value originally comes from outside the function. typedef LiveVariables::AnalysisDataTy LVDataTy; - LVDataTy& D = StateMgr.getLiveVariables().getAnalysisData(); + LVDataTy& D = InitLoc->getLiveVariables()->getAnalysisData(); Store St = VBFactory.GetEmptyMap().getRoot(); for (LVDataTy::decl_iterator I=D.begin_decl(), E=D.end_decl(); I != E; ++I) { |