[PATCH] D95776: [OpenCL] Add macro definitions of OpenCL C 3.0 features

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 2 09:12:40 PST 2021


Anastasia added inline comments.


================
Comment at: clang/lib/Basic/Targets.cpp:743
+  // Assume compiling for FULL profile
+  Builder.defineMacro("__opencl_c_int64");
 }
----------------
azabaznov wrote:
> Anastasia wrote:
> > Btw we could add the other feature macros for earlier versions too but I guess it makes code more complicated?
> Yes, this will complicate things: we decided to generate a warning if any of core features is unsupported, right? So making OpenCL C 3.0 features as core in OpenCL C 2.0 will result in this kind of warning; distinguishing these features among the set of core functionality may require workarounds in clang, so let's keep them in headers only for OpenCL C 2.0.
Ok, this is fine. If we find it useful they can be changed later on for OpenCL v2.0 too.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95776/new/

https://reviews.llvm.org/D95776



More information about the cfe-commits mailing list