diff options
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 3abb26991a4..be9a92a5681 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -2046,13 +2046,9 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { CE->getExprLoc()); } - case CK_ZeroToOCLEvent: { - assert(DestTy->isEventT() && "CK_ZeroToOCLEvent cast on non-event type"); - return llvm::Constant::getNullValue(ConvertType(DestTy)); - } - - case CK_ZeroToOCLQueue: { - assert(DestTy->isQueueT() && "CK_ZeroToOCLQueue cast on non queue_t type"); + case CK_ZeroToOCLOpaqueType: { + assert((DestTy->isEventT() || DestTy->isQueueT()) && + "CK_ZeroToOCLEvent cast on non-event type"); return llvm::Constant::getNullValue(ConvertType(DestTy)); } |

