[PATCH] D97052: [OpenCL] Prevent adding extension pragma by default

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 19 07:48:01 PST 2021


Anastasia created this revision.
Anastasia added reviewers: azabaznov, svenvh, mantognini.
Herald added subscribers: ebevhan, jfb, yaxunl.
Anastasia requested review of this revision.

Currently, extension pragma is always added when new OpenCL option (extension or feature) is added to the frontend. This change adds a new field for the options that allows specifying the need for the pragmas.

For backward compatibility, the pragmas are added for all extensions prior to OpenCL 3.0.

For OpenCL 3.0 features and future extensions (those that are documented in the unified spec only), the pragmas is not to be added unless they are explicitly requested and their behavior is sufficiently well explained.


https://reviews.llvm.org/D97052

Files:
  clang/include/clang/Basic/OpenCLExtensions.def
  clang/include/clang/Basic/OpenCLOptions.h
  clang/lib/Basic/OpenCLOptions.cpp
  clang/lib/Basic/Targets.cpp
  clang/lib/Parse/ParsePragma.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/test/SemaOpenCL/extension-version.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97052.324980.patch
Type: text/x-patch
Size: 18685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210219/108fdb85/attachment-0001.bin>


More information about the cfe-commits mailing list