ASTContext is now a reference member of StoreManager.

llvm-svn: 95531
This commit is contained in:
Zhongxing Xu 2010-02-08 06:00:22 +00:00
parent b67dc69a78
commit 8ffee4d5f8
3 changed files with 4 additions and 3 deletions

View File

@ -41,6 +41,7 @@ protected:
/// MRMgr - Manages region objects associated with this StoreManager.
MemRegionManager &MRMgr;
ASTContext &Ctx;
StoreManager(GRStateManager &stateMgr);

View File

@ -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:

View File

@ -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) {