diff options
author | Anton Zabaznov <anton.zabaznov@intel.com> | 2021-07-30 04:19:17 +0300 |
---|---|---|
committer | Anton Zabaznov <anton.zabaznov@intel.com> | 2021-07-30 04:54:28 +0300 |
commit | f16a4fcbe510d17b3f361d446eaf223208ded2bd (patch) | |
tree | 8e9720e678f77841555aa740c6873a5371223aca /clang/lib/Basic/OpenCLOptions.cpp | |
parent | ac2ffdef9cc8d152801ca87d81736fb1dec9cb88 (diff) | |
download | llvm-f16a4fcbe510d17b3f361d446eaf223208ded2bd.zip llvm-f16a4fcbe510d17b3f361d446eaf223208ded2bd.tar.gz llvm-f16a4fcbe510d17b3f361d446eaf223208ded2bd.tar.bz2 |
[OpenCL] Add support of __opencl_c_3d_image_writes feature macro
This feature requires support of __opencl_c_images, so diagnostics for that is provided as well.
Also, ensure that cl_khr_3d_image_writes feature macro is set to the same value.
Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D106260
Diffstat (limited to 'clang/lib/Basic/OpenCLOptions.cpp')
-rw-r--r-- | clang/lib/Basic/OpenCLOptions.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/OpenCLOptions.cpp b/clang/lib/Basic/OpenCLOptions.cpp index 2e215b1..f4f474f 100644 --- a/clang/lib/Basic/OpenCLOptions.cpp +++ b/clang/lib/Basic/OpenCLOptions.cpp @@ -111,7 +111,8 @@ bool OpenCLOptions::diagnoseUnsupportedFeatureDependencies( // Feature pairs. First feature in a pair requires the second one to be // supported. static const llvm::StringMap<llvm::StringRef> DependentFeaturesMap = { - {"__opencl_c_read_write_images", "__opencl_c_images"}}; + {"__opencl_c_read_write_images", "__opencl_c_images"}, + {"__opencl_c_3d_image_writes", "__opencl_c_images"}}; auto OpenCLFeaturesMap = TI.getSupportedOpenCLOpts(); @@ -130,7 +131,8 @@ bool OpenCLOptions::diagnoseFeatureExtensionDifferences( const TargetInfo &TI, DiagnosticsEngine &Diags) { // Extensions and equivalent feature pairs. static const llvm::StringMap<llvm::StringRef> FeatureExtensionMap = { - {"cl_khr_fp64", "__opencl_c_fp64"}}; + {"cl_khr_fp64", "__opencl_c_fp64"}, + {"cl_khr_3d_image_writes", "__opencl_c_3d_image_writes"}}; auto OpenCLFeaturesMap = TI.getSupportedOpenCLOpts(); |