| 1 |
/// Verify timestamps that gets embedded in the module |
| 2 |
#include <c-header.h> |
| 3 |
|
| 4 |
// RUN: rm -rf %t |
| 5 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash \ |
| 6 |
// RUN: -fmodules-cache-path=%t -I %S/Inputs %s |
| 7 |
// RUN: cp %t/c_library.pcm %t1.pcm |
| 8 |
// RUN: llvm-bcanalyzer --dump --disable-histogram %t1.pcm > %t1.dump |
| 9 |
// RUN: FileCheck %s --check-prefix=CHECK --check-prefix=TIMESTAMP --input-file %t1.dump |
| 10 |
// RUN: rm -rf %t |
| 11 |
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash \ |
| 12 |
// RUN: -fmodules-cache-path=%t -I %S/Inputs -fno-pch-timestamp %s |
| 13 |
// RUN: cp %t/c_library.pcm %t2.pcm |
| 14 |
// RUN: llvm-bcanalyzer --dump --disable-histogram %t2.pcm > %t2.dump |
| 15 |
// RUN: FileCheck %s --check-prefix=CHECK --check-prefix=NOTIMESTAMP --input-file %t2.dump |
| 16 |
// RUN: not diff %t1.dump %t2.dump |
| 17 |
|
| 18 |
|
| 19 |
// CHECK: <INPUT_FILES_BLOCK NumWords=[[#]] BlockCodeSize=[[#]]> |
| 20 |
// CHECK-NEXT: <INPUT_FILE abbrevid=4 op0=1 op1=[[#]] |
| 21 |
// TIMESTAMP-NOT: op2=0 |
| 22 |
// NOTIMESTAMP: op2=0 |
| 23 |
// 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=0 |
| 27 |
// NOTIMESTAMP: op2=0 |
| 28 |
// CHECK-SAME: blob data = 'c-header.h' |
| 29 |
// CHECK-NEXT: <INPUT_FILE_HASH abbrevid=[[#]] op0=[[#]] op1=[[#]]/> |
| 30 |
// CHECK-NEXT: </INPUT_FILES_BLOCK> |