[PATCH] D103191: [OpenCL] Add support of __opencl_c_program_scope_global_variables feature macro

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 22 07:59:32 PDT 2021


Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.

LGTM! Thanks!



================
Comment at: clang/include/clang/Basic/OpenCLOptions.h:80
+    return Opts.OpenCLCPlusPlus || Opts.OpenCLVersion == 200 ||
+           (Opts.OpenCLVersion >= 300 &&
+            isSupported("__opencl_c_program_scope_global_variables", Opts));
----------------
While it is not critical, I would slightly prefer that we are checking for `== 300`. Checking `>= 300` assumes that the next versions are going to be backward compatible. But it is not always the case if we look at the OpenCL evolution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103191



More information about the cfe-commits mailing list