[PATCH] D20444: [OpenCL] Include opencl-c.h by default as a clang module
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 8 12:19:19 PDT 2016
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 module, it will fail. Also add a check to make sure module is read.
================
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 -triple spir-unknown-unknown -emit-llvm -o - -cl-std=CL2.0 -finclude-default-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s | FileCheck --check-prefix=CHECK20 %s
+// RUN: %clang_cc1 -triple amdgcn--amdhsa -emit-llvm -o - -cl-std=CL2.0 -finclude-default-header -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s | FileCheck --check-prefix=CHECK20 %s
----------------
I added check to the second compilation to make sure module is read, also changed the modules to be read only so that they won't be created again.
http://reviews.llvm.org/D20444
More information about the cfe-commits
mailing list