[cfe-commits] r73880 - /cfe/trunk/lib/Analysis/RegionStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Mon Jun 22 01:36:11 PDT 2009


Author: zhongxingxu
Date: Mon Jun 22 03:36:10 2009
New Revision: 73880

URL: http://llvm.org/viewvc/llvm-project?rev=73880&view=rev
Log:
Allow CodeTextRegion to be cast to 'void *'.

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

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

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Mon Jun 22 03:36:10 2009
@@ -676,7 +676,9 @@
 
   // CodeTextRegion should be cast to only function pointer type.
   if (isa<CodeTextRegion>(R)) {
-    assert(CastToTy->isFunctionPointerType() || CastToTy->isBlockPointerType());
+    assert(CastToTy->isFunctionPointerType() || CastToTy->isBlockPointerType()
+           || (CastToTy->isPointerType() 
+              && CastToTy->getAsPointerType()->getPointeeType()->isVoidType()));
     return CastResult(state, R);
   }
 





More information about the cfe-commits mailing list