[llvm-branch-commits] [cfe-branch] r71440 - /cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp

Mike Stump mrs at apple.com
Mon May 11 10:22:33 PDT 2009


Author: mrs
Date: Mon May 11 12:22:32 2009
New Revision: 71440

URL: http://llvm.org/viewvc/llvm-project?rev=71440&view=rev
Log:
Merge in 71431:

TypedRegion is a too general assumption. Usually we only want to invalidate
the VarRegion as a super region of an ElementRegion.

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=71440&r1=71439&r2=71440&view=diff

==============================================================================
--- cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/branches/Apple/Dib/lib/Analysis/CFRefCount.cpp Mon May 11 12:22:32 2009
@@ -2660,7 +2660,7 @@
         if (R) {
           // Are we dealing with an ElementRegion?  If the element type is
           // a basic integer type (e.g., char, int) and the underying region
-          // is also typed then strip off the ElementRegion.
+          // is a variable region then strip off the ElementRegion.
           // FIXME: We really need to think about this for the general case
           //   as sometimes we are reasoning about arrays and other times
           //   about (char*), etc., is just a form of passing raw bytes.
@@ -2674,8 +2674,8 @@
             // still allowing us to do checker-specific logic (e.g.,
             // invalidating reference counts), probably via callbacks.            
             if (ER->getElementType()->isIntegralType())
-              if (const TypedRegion *superReg =
-                  dyn_cast<TypedRegion>(ER->getSuperRegion()))
+              if (const VarRegion *superReg =
+                  dyn_cast<VarRegion>(ER->getSuperRegion()))
                 R = superReg;
             // FIXME: What about layers of ElementRegions?
           }





More information about the llvm-branch-commits mailing list