31 lines · c
1/// Verify timestamps that gets embedded in the module2#include <c-header.h>3 4// RUN: rm -rf %t5// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash \6// RUN: -fmodules-cache-path=%t -I %S/Inputs %s7// RUN: cp %t/c_library.pcm %t1.pcm8// RUN: llvm-bcanalyzer --dump --disable-histogram %t1.pcm > %t1.dump9// RUN: FileCheck %s --check-prefix=CHECK --check-prefix=TIMESTAMP --input-file %t1.dump10// RUN: rm -rf %t11// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash \12// RUN: -fmodules-cache-path=%t -I %S/Inputs -fno-pch-timestamp %s13// RUN: cp %t/c_library.pcm %t2.pcm14// RUN: llvm-bcanalyzer --dump --disable-histogram %t2.pcm > %t2.dump15// RUN: FileCheck %s --check-prefix=CHECK --check-prefix=NOTIMESTAMP --input-file %t2.dump16// RUN: not diff %t1.dump %t2.dump17 18 19// CHECK: <INPUT_FILES_BLOCK NumWords=[[#]] BlockCodeSize=[[#]]>20// CHECK-NEXT: <INPUT_FILE abbrevid=4 op0=1 op1=[[#]]21// TIMESTAMP-NOT: op2=022// NOTIMESTAMP: op2=023// CHECK-SAME: blob data = 'module.modulemap'24// CHECK-NEXT: <INPUT_FILE_HASH abbrevid=[[#]] op0=[[#]] op1=[[#]]/>25// CHECK-NEXT: <INPUT_FILE abbrevid=4 op0=2 op1=[[#]]26// TIMESTAMP-NOT: op2=027// NOTIMESTAMP: op2=028// CHECK-SAME: blob data = 'c-header.h'29// CHECK-NEXT: <INPUT_FILE_HASH abbrevid=[[#]] op0=[[#]] op1=[[#]]/>30// CHECK-NEXT: </INPUT_FILES_BLOCK>31