Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that we've caught every case, add asserts to CastExpr that strictly determine which cast kind is used for which kind of bit cast. llvm-svn: 139352
This commit is contained in:
@@ -1028,7 +1028,8 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
|
||||
return EmitLoadOfLValue(CGF.MakeAddrLValue(V, DestTy));
|
||||
}
|
||||
|
||||
case CK_AnyPointerToObjCPointerCast:
|
||||
case CK_CPointerToObjCPointerCast:
|
||||
case CK_BlockPointerToObjCPointerCast:
|
||||
case CK_AnyPointerToBlockPointerCast:
|
||||
case CK_BitCast: {
|
||||
Value *Src = Visit(const_cast<Expr*>(E));
|
||||
|
||||
Reference in New Issue
Block a user