diff options
| author | John McCall <rjmccall@apple.com> | 2011-09-09 05:25:32 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-09-09 05:25:32 +0000 |
| commit | 9320b87cff21e87752c5b511ba49aaead5d5792c (patch) | |
| tree | 47977c15fd7ca50d320cb73f624a0d5010ecad86 /clang/lib/CodeGen/CGExpr.cpp | |
| parent | 10162ab7edce78aab8c9943b0c15eef4a4115db0 (diff) | |
| download | bcm5719-llvm-9320b87cff21e87752c5b511ba49aaead5d5792c.tar.gz bcm5719-llvm-9320b87cff21e87752c5b511ba49aaead5d5792c.zip | |
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
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 9364ade96df..daaf7a58871 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2077,7 +2077,8 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) { case CK_ConstructorConversion: case CK_UserDefinedConversion: - case CK_AnyPointerToObjCPointerCast: + case CK_CPointerToObjCPointerCast: + case CK_BlockPointerToObjCPointerCast: return EmitLValue(E->getSubExpr()); case CK_UncheckedDerivedToBase: |

