[cfe-commits] r76287 - /cfe/trunk/lib/Analysis/ValueManager.cpp

Ted Kremenek kremenek at apple.com
Fri Jul 17 23:27:02 PDT 2009


Author: kremenek
Date: Sat Jul 18 01:27:01 2009
New Revision: 76287

URL: http://llvm.org/viewvc/llvm-project?rev=76287&view=rev
Log:
Return CodeTextRegions for BlockPointerTypes in addition to FunctionPointerTypes.

Modified:
    cfe/trunk/lib/Analysis/ValueManager.cpp

Modified: cfe/trunk/lib/Analysis/ValueManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ValueManager.cpp?rev=76287&r1=76286&r2=76287&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/ValueManager.cpp (original)
+++ cfe/trunk/lib/Analysis/ValueManager.cpp Sat Jul 18 01:27:01 2009
@@ -73,9 +73,9 @@
     if (T.isNull())
       T = TR->getValueType(SymMgr.getContext());
 
-    // If T is of function pointer type, create a CodeTextRegion wrapping a
-    // symbol.
-    if (T->isFunctionPointerType()) {
+    // If T is of function pointer type or a block pointer type, create a
+    // CodeTextRegion wrapping that symbol.
+    if (T->isFunctionPointerType() || T->isBlockPointerType()) {
       return loc::MemRegionVal(MemMgr.getCodeTextRegion(sym, T));
     }
     
@@ -94,9 +94,9 @@
   QualType T = E->getType();
   SymbolRef sym = SymMgr.getConjuredSymbol(E, Count);
 
-  // If T is of function pointer type, create a CodeTextRegion wrapping a
-  // symbol.
-  if (T->isFunctionPointerType()) {
+  // If T is of function pointer type or a block pointer type, create a
+  // CodeTextRegion wrapping a symbol.
+  if (T->isFunctionPointerType() || T->isBlockPointerType()) {
     return loc::MemRegionVal(MemMgr.getCodeTextRegion(sym, T));
   }
 
@@ -114,9 +114,9 @@
 
   SymbolRef sym = SymMgr.getConjuredSymbol(E, T, Count);
 
-  // If T is of function pointer type, create a CodeTextRegion wrapping a
-  // symbol.
-  if (T->isFunctionPointerType()) {
+  // If T is of function pointer type or a block pointer type, create a
+  // CodeTextRegion wrapping a symbol.
+  if (T->isFunctionPointerType() || T->isBlockPointerType()) {
     return loc::MemRegionVal(MemMgr.getCodeTextRegion(sym, T));
   }
 





More information about the cfe-commits mailing list