diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-12-16 23:53:37 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-12-16 23:53:37 +0000 |
commit | d970acb60fbe52ac47062298953738d76828e913 (patch) | |
tree | 261a0a7b6bae00b5b63a433030b70d96e3cde9bf /clang/lib/Analysis/BasicStore.cpp | |
parent | 7f30b64dceead8cb4777e46713a1ab50ad2499b5 (diff) | |
download | bcm5719-llvm-d970acb60fbe52ac47062298953738d76828e913.tar.gz bcm5719-llvm-d970acb60fbe52ac47062298953738d76828e913.zip |
Completely remove ObjCObjectRegion (tests pass this time).
llvm-svn: 91572
Diffstat (limited to 'clang/lib/Analysis/BasicStore.cpp')
-rw-r--r-- | clang/lib/Analysis/BasicStore.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clang/lib/Analysis/BasicStore.cpp b/clang/lib/Analysis/BasicStore.cpp index a38aaa7eb26..224281b1777 100644 --- a/clang/lib/Analysis/BasicStore.cpp +++ b/clang/lib/Analysis/BasicStore.cpp @@ -479,15 +479,14 @@ Store BasicStoreManager::getInitialStore(const LocationContext *InitLoc) { const Decl& CD = *InitLoc->getDecl(); if (const ObjCMethodDecl* MD = dyn_cast<ObjCMethodDecl>(&CD)) { if (MD->getSelfDecl() == PD) { - // FIXME: Just use a symbolic region, and remove ObjCObjectRegion - // entirely. - const ObjCObjectRegion *SelfRegion = - MRMgr.getObjCObjectRegion(MD->getClassInterface(), - MRMgr.getHeapRegion()); - - St = BindInternal(St, ValMgr.makeLoc(MRMgr.getVarRegion(PD, InitLoc)), - ValMgr.makeLoc(SelfRegion)); - + // FIXME: Add type constraints (when they become available) to + // SelfRegion? (i.e., it implements MD->getClassInterface()). + const MemRegion *VR = MRMgr.getVarRegion(PD, InitLoc); + const MemRegion *SelfRegion = + ValMgr.getRegionValueSymbolVal(VR).getAsRegion(); + assert(SelfRegion); + St = BindInternal(St, ValMgr.makeLoc(VR), + loc::MemRegionVal(SelfRegion)); // Scan the method for ivar references. While this requires an // entire AST scan, the cost should not be high in practice. St = scanForIvars(MD->getBody(), PD, SelfRegion, St); |