[llvm-branch-commits] [cfe-branch] r71503 - /cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp
Mike Stump
mrs at apple.com
Mon May 11 16:22:59 PDT 2009
Author: mrs
Date: Mon May 11 18:22:59 2009
New Revision: 71503
URL: http://llvm.org/viewvc/llvm-project?rev=71503&view=rev
Log:
Merge in 71488:
When stripping element regions for invalidating region values, treat FieldRegions and ObjCIvarRegions as "base" regions in addition to VarRegions.
Modified:
cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp
Modified: cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp?rev=71503&r1=71502&r2=71503&view=diff
==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp Mon May 11 18:22:59 2009
@@ -2673,10 +2673,13 @@
// approriately delegated to the respective StoreManagers while
// still allowing us to do checker-specific logic (e.g.,
// invalidating reference counts), probably via callbacks.
- if (ER->getElementType()->isIntegralType())
- if (const VarRegion *superReg =
- dyn_cast<VarRegion>(ER->getSuperRegion()))
- R = superReg;
+ if (ER->getElementType()->isIntegralType()) {
+ const MemRegion *superReg = ER->getSuperRegion();
+ if (isa<VarRegion>(superReg) || isa<FieldRegion>(superReg) ||
+ isa<ObjCIvarRegion>(superReg))
+ R = cast<TypedRegion>(superReg);
+ }
+
// FIXME: What about layers of ElementRegions?
}
More information about the llvm-branch-commits
mailing list