[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 16 06:44:57 PST 2016
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Small nitpicks below can be done before committing. Also it would be nice to double check the compile time is still fine after the last rebase.
Thanks!
================
Comment at: include/clang/Basic/OpenCLOptions.h:28
+ unsigned Avail; // Option starts to be available in this OpenCL version
+ unsigned Core; // Options becomes (optional) core feature in this OpenCL
+ // version
----------------
Options -> Option
================
Comment at: include/clang/Basic/OpenCLOptions.h:43
- // Enable or disable all options.
- void setAll(bool Enable = true) {
-#define OPENCLEXT(nm) nm = Enable;
-#include "clang/Basic/OpenCLExtensions.def"
+ // Is supported OpenCL extension or (optional) core feature for OpenCL version
+ // \p CLVer.
----------------
Did you mean "and (optional) core feature?"
================
Comment at: test/SemaOpenCL/extension-begin.cl:5
+// Test with pch.
+// RUN: %clang_cc1 %s -DHEADER -triple spir-unknown-unknown -emit-pch -DHEADER_ONLY -o %t -verify -pedantic
+// RUN: %clang_cc1 %s -DHEADER_USER -triple spir-unknown-unknown -include-pch %t -fsyntax-only -verify -pedantic
----------------
Do we need -DHEADER_ONLY here?
https://reviews.llvm.org/D21698
More information about the cfe-commits
mailing list