aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/OpenCLOptions.cpp
diff options
context:
space:
mode:
authorAnton Zabaznov <anton.zabaznov@intel.com>2021-07-30 04:56:21 +0300
committerAnton Zabaznov <anton.zabaznov@intel.com>2021-07-30 05:27:55 +0300
commitd1e4b25756730576996457ba7324e9bf210e3693 (patch)
tree97b6144c7381f97c400cd023269ea8c2f2ce992f /clang/lib/Basic/OpenCLOptions.cpp
parent754520a2bf55a0873753efb1d863a5ffd116c48b (diff)
downloadllvm-d1e4b25756730576996457ba7324e9bf210e3693.zip
llvm-d1e4b25756730576996457ba7324e9bf210e3693.tar.gz
llvm-d1e4b25756730576996457ba7324e9bf210e3693.tar.bz2
[OpenCL] Add support of __opencl_c_pipes feature macro.
'pipe' keyword is introduced in OpenCL C 2.0: so do checks for OpenCL C version while parsing and then later on check for language options to construct actual pipe. This feature requires support of __opencl_c_generic_address_space, so diagnostics for that is provided as well. Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D106748
Diffstat (limited to 'clang/lib/Basic/OpenCLOptions.cpp')
-rw-r--r--clang/lib/Basic/OpenCLOptions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Basic/OpenCLOptions.cpp b/clang/lib/Basic/OpenCLOptions.cpp
index f4f474f..b7408f3 100644
--- a/clang/lib/Basic/OpenCLOptions.cpp
+++ b/clang/lib/Basic/OpenCLOptions.cpp
@@ -112,7 +112,8 @@ bool OpenCLOptions::diagnoseUnsupportedFeatureDependencies(
// supported.
static const llvm::StringMap<llvm::StringRef> DependentFeaturesMap = {
{"__opencl_c_read_write_images", "__opencl_c_images"},
- {"__opencl_c_3d_image_writes", "__opencl_c_images"}};
+ {"__opencl_c_3d_image_writes", "__opencl_c_images"},
+ {"__opencl_c_pipes", "__opencl_c_generic_address_space"}};
auto OpenCLFeaturesMap = TI.getSupportedOpenCLOpts();