[PATCH] D42532: [OpenCL] Add "cles_khr_int64" extension.

Alexey Bader via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 03:51:31 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL323522: [OpenCL] Add "cles_khr_int64" extension. (authored by bader, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D42532

Files:
  cfe/trunk/include/clang/Basic/OpenCLExtensions.def
  cfe/trunk/test/SemaOpenCL/extension-version.cl


Index: cfe/trunk/include/clang/Basic/OpenCLExtensions.def
===================================================================
--- cfe/trunk/include/clang/Basic/OpenCLExtensions.def
+++ cfe/trunk/include/clang/Basic/OpenCLExtensions.def
@@ -53,6 +53,9 @@
 OPENCLEXT_INTERNAL(cl_khr_gl_event, 110, ~0U)
 OPENCLEXT_INTERNAL(cl_khr_d3d10_sharing, 110, ~0U)
 
+// EMBEDDED_PROFILE
+OPENCLEXT_INTERNAL(cles_khr_int64, 110, ~0U)
+
 // OpenCL 1.2.
 OPENCLEXT_INTERNAL(cl_khr_context_abort, 120, ~0U)
 OPENCLEXT_INTERNAL(cl_khr_d3d11_sharing, 120, ~0U)
Index: cfe/trunk/test/SemaOpenCL/extension-version.cl
===================================================================
--- cfe/trunk/test/SemaOpenCL/extension-version.cl
+++ cfe/trunk/test/SemaOpenCL/extension-version.cl
@@ -131,6 +131,15 @@
 #endif
 #pragma OPENCL EXTENSION cl_khr_d3d10_sharing: enable
 
+#if (__OPENCL_C_VERSION__ >= 110)
+#ifndef cles_khr_int64
+#error "Missing cles_khr_int64 define"
+#endif
+#else
+// expected-warning at +2{{unsupported OpenCL extension 'cles_khr_int64' - ignoring}}
+#endif
+#pragma OPENCL EXTENSION cles_khr_int64: enable
+
 #if (__OPENCL_C_VERSION__ >= 120)
 #ifndef cl_khr_context_abort
 #error "Missing cl_context_abort define"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42532.131570.patch
Type: text/x-patch
Size: 1218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180126/575254cf/attachment.bin>


More information about the llvm-commits mailing list