summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorAndrew Savonichev <andrew.savonichev@intel.com>2018-10-23 15:19:20 +0000
committerAndrew Savonichev <andrew.savonichev@intel.com>2018-10-23 15:19:20 +0000
commitb555b76ed3548d0a27653eac746bc686f810caa3 (patch)
tree40f94849e6abdae867b07faa1100c2bb72dde412 /clang/lib/CodeGen/CGExprScalar.cpp
parent532a0f122e3a20415704fe3899351332795238e6 (diff)
downloadbcm5719-llvm-b555b76ed3548d0a27653eac746bc686f810caa3.tar.gz
bcm5719-llvm-b555b76ed3548d0a27653eac746bc686f810caa3.zip
[OpenCL][NFC] Unify ZeroToOCL* cast types
Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D52654 llvm-svn: 345038
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp10
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));
}
OpenPOWER on IntegriCloud