[PATCH] D23712: [OpenCL] Override supported OpenCL extensions with -cl-ext option

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 07:36:36 PDT 2016


yaxunl added a comment.

I think we need two more tests for concatenating and overriding the option, e.g

  -cl-ext=-cl_khr_fp64 -cl-ext=+cl_khr_fp64

and

  -cl-ext=-cl_khr_fp64,+cl_khr_fp64


================
Comment at: include/clang/Basic/OpenCLOptions.h:39
@@ +38,3 @@
+
+  void set(llvm::StringRef Ext, bool Enable = true) {
+    assert(!Ext.empty() && "Extension is empty.");
----------------
Better add a comments for this function about its semantics, i.e., if Ext does not starts with +/-, it is enabled/disabled by \p Enable, otherwise +/- overrides \p Enable, since this is not obvious.


https://reviews.llvm.org/D23712





More information about the cfe-commits mailing list