[PATCH] D20444: [OpenCL] Include opencl-c.h by default as a clang module
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 6 12:00:58 PDT 2016
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 | FileCheck %s
+// RUN: diff %t/1_0.pcm %t/opencl_c.pcm
+// RUN: rm %t/opencl_c.pcm
----------------
Anastasia wrote:
> I see, but is diffing accurate here? Because if the file is regenerated but with exactly the same content it won't be caught...
It cannot detect if the file was re-written with the same content.
There is one way we can do that:
get the modified time of the file
sleep 1 second
get the modified time of the file again and compare
but it will slow down the test by 1 second. do we really want to do that?
================
Comment at: test/Headers/opencl-c-header.cl:70
@@ +69,3 @@
+// RUN: %clang_cc1 -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
+// RUN: %clang_cc1 -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 -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
----------------
Anastasia wrote:
> So in this line it will be regenerated because the line above used different triple?
No. It should use the cached module.
http://reviews.llvm.org/D20444
More information about the cfe-commits
mailing list