diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-08 06:00:22 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-02-08 06:00:22 +0000 |
commit | 2a393db0969630d01a71fd384affb33ea0a693d1 (patch) | |
tree | 932b7000959ffab025dda705079af0f9bfeb75ba | |
parent | 36d02e0984fcb7bdae37df7659603075c2a4c113 (diff) |
ASTContext is now a reference member of StoreManager.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95531 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Checker/PathSensitive/Store.h | 1 | ||||
-rw-r--r-- | lib/Checker/FlatStore.cpp | 4 | ||||
-rw-r--r-- | lib/Checker/Store.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/include/clang/Checker/PathSensitive/Store.h b/include/clang/Checker/PathSensitive/Store.h index 3121e461bc..7d93688344 100644 --- a/include/clang/Checker/PathSensitive/Store.h +++ b/include/clang/Checker/PathSensitive/Store.h @@ -41,6 +41,7 @@ protected: /// MRMgr - Manages region objects associated with this StoreManager. MemRegionManager &MRMgr; + ASTContext &Ctx; StoreManager(GRStateManager &stateMgr); diff --git a/lib/Checker/FlatStore.cpp b/lib/Checker/FlatStore.cpp index ca182708e1..fdeeab9529 100644 --- a/lib/Checker/FlatStore.cpp +++ b/lib/Checker/FlatStore.cpp @@ -179,8 +179,8 @@ void FlatStoreManager::iterBindings(Store store, BindingsHandler& f) { Interval FlatStoreManager::RegionToInterval(const MemRegion *R) { switch (R->getKind()) { case MemRegion::VarRegionKind: { - QualType T = cast<VarRegion>(R)->getValueType(StateMgr.getContext()); - uint64_t Size = StateMgr.getContext().getTypeSize(T); + QualType T = cast<VarRegion>(R)->getValueType(Ctx); + uint64_t Size = Ctx.getTypeSize(T); return Interval(0, Size-1); } default: diff --git a/lib/Checker/Store.cpp b/lib/Checker/Store.cpp index c7746a6dec..5893733c54 100644 --- a/lib/Checker/Store.cpp +++ b/lib/Checker/Store.cpp @@ -19,7 +19,7 @@ using namespace clang; StoreManager::StoreManager(GRStateManager &stateMgr) : ValMgr(stateMgr.getValueManager()), StateMgr(stateMgr), - MRMgr(ValMgr.getRegionManager()) {} + MRMgr(ValMgr.getRegionManager()), Ctx(stateMgr.getContext()) {} const MemRegion *StoreManager::MakeElementRegion(const MemRegion *Base, QualType EleTy, uint64_t index) { |