This revision was automatically updated to reflect the committed changes.
Closed by commit rL273191: [OpenCL] Include opencl-c.h by default as a clang
module (authored by yaxunl).
Changed prior to commit:
http://reviews.llvm.org/D20444?vs=60568&id=61290#toc
Repository:
rL LLVM
http://review
yaxunl added a comment.
In http://reviews.llvm.org/D20444#457588, @Anastasia wrote:
> LGTM, I think it would be nice if the block related code goes in a separate
> commit.
>
> Thanks!
Will do. Thanks.
http://reviews.llvm.org/D20444
___
cfe-commi
Anastasia accepted this revision.
Anastasia added a comment.
LGTM, I think it would be nice if the block related code goes in a separate
commit.
Thanks!
http://reviews.llvm.org/D20444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://
yaxunl updated this revision to Diff 60568.
yaxunl added a comment.
Update the test as Anastasia suggested.
http://reviews.llvm.org/D20444
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
include/clang/Frontend/Comp
Anastasia added inline comments.
Comment at: test/Headers/opencl-c-header.cl:53-54
@@ +52,4 @@
+// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t -fdisable-module-hash -ftime-report %
yaxunl added inline comments.
Comment at: test/Headers/opencl-c-header.cl:53-54
@@ +52,4 @@
+// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t -fdisable-module-hash -ftime-report %s 2
yaxunl marked 2 inline comments as done.
Comment at: test/Headers/opencl-c-header.cl:70
@@ +69,3 @@
+// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t %s | FileCheck %s
+// RUN: %clan
Anastasia added inline comments.
Comment at: test/Headers/opencl-c-header.cl:70
@@ +69,3 @@
+// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t %s | FileCheck %s
+// RUN: %clang_cc1 -t
yaxunl marked 5 inline comments as done.
Comment at: test/Headers/opencl-c-header.cl:50
@@ +49,3 @@
+
+// ===
+// Compile for OpenCL 1.0 for the second time. The module should not be
re-created.
I changed the module to read only. If Clang tries to create a new mo
yaxunl updated this revision to Diff 60078.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
Modified the test for module as Anastasia suggested.
http://reviews.llvm.org/D20444
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/LangOptions.def
include/cl
Anastasia added inline comments.
Comment at: test/Headers/opencl-c-header.cl:50
@@ +49,3 @@
+// RUN: %clang_cc1 -cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t -fdisable-module-hash %s | FileChec
yaxunl marked 4 inline comments as done.
Comment at: test/Headers/opencl-c-header.cl:50
@@ +49,3 @@
+// RUN: %clang_cc1 -cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t -fdisable-module-hash %s |
Anastasia added inline comments.
Comment at: test/Headers/opencl-c-header.cl:50
@@ +49,3 @@
+// RUN: %clang_cc1 -cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t -fdisable-module-hash %s | FileChec
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 59733.
yaxunl marked 8 inline comments as done.
yaxunl added a comment.
Update the diagnositic msg for fblocks.
http://reviews.llvm.org/D20444
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/B
yaxunl added inline comments.
Comment at: test/Headers/opencl-c-header.cl:50
@@ +49,3 @@
+// RUN: %clang_cc1 -cc1 -triple spir-unknown-unknown -emit-llvm -o -
-finclude-default-header -fmodules -fimplicit-module-maps
-fmodules-cache-path=%t -fdisable-module-hash %s | FileCheck %
Anastasia added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7347
@@ -7346,3 +7346,3 @@
def err_blocks_disable : Error<"blocks support disabled - compile with
-fblocks"
- " or pick a deployment target that supports them">;
+ " or %select{pick a deplo
yaxunl updated this revision to Diff 59431.
yaxunl added a comment.
Improve diag msg for fblocks.
http://reviews.llvm.org/D20444
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
include/clang/Frontend/CompilerInvoca
Anastasia added inline comments.
Comment at: test/Frontend/opencl-blocks.cl:11
@@ +10,3 @@
+#if __OPENCL_C_VERSION__ < CL_VERSION_2_0 && !defined(BLOCKS)
+ // expected-error@-2{{blocks support disabled - compile with -fblocks or
pick a deployment target that supports them}}
+#el
yaxunl added inline comments.
Comment at: test/Headers/opencl-c-header.cl:53-54
@@ +52,4 @@
+
+// ===
+// Compile for OpenCL 2.0 for the first time. The module should change.
+// RUN: %clang_cc1 -cc1 -triple spir-unknown-unknown -emit-llvm -o -
-cl-std=CL2.0 -finclude-default-hea
yaxunl updated this revision to Diff 59398.
yaxunl marked an inline comment as done.
yaxunl added a comment.
Add a test for -fblocks as Anastasia suggested.
http://reviews.llvm.org/D20444
Files:
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
include/clang/Frontend/
bader accepted this revision.
Comment at: test/Headers/opencl-c-header.cl:30-31
@@ +29,4 @@
+
+// ===
+// Compile for OpenCL 2.0 for the first time. The module should change.
+// RUN: %clang_cc1 -cc1 -emit-llvm -o - -cl-std=CL2.0
-finclude-default-header -fmodules -fimplicit-mod
Anastasia added inline comments.
Comment at: lib/Frontend/CompilerInvocation.cpp:1782
@@ -1773,2 +1781,3 @@
Opts.RTTIData = Opts.RTTI && !Args.hasArg(OPT_fno_rtti_data);
- Opts.Blocks = Args.hasArg(OPT_fblocks);
+ Opts.Blocks = Args.hasArg(OPT_fblocks) || (Opts.OpenCL
+&&
pxli168 accepted this revision.
pxli168 added a comment.
This revision is now accepted and ready to land.
LGTM!
Thanks!
http://reviews.llvm.org/D20444
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/list
yaxunl marked an inline comment as done.
Comment at: include/clang/Basic/LangOptions.def:220
@@ -219,3 +219,3 @@
ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target,
"OpenCL address space map mangling mode")
-
+LANGOPT(IncludeDefaultHeader, 1, 0, "Include
yaxunl retitled this revision from "[OpenCL] Include opencl-c.h by default as a
module" to "[OpenCL] Include opencl-c.h by default as a clang module".
yaxunl updated the summary for this revision.
yaxunl updated this revision to Diff 58830.
yaxunl added a comment.
Revised as Anastasia suggested.
25 matches
Mail list logo