| 1 |
// AIX does not support -gdwarf-5. |
| 2 |
// UNSUPPORTED: target={{.*}}-aix{{.*}} |
| 3 |
|
| 4 |
// RUN: %clang -emit-llvm -S -g -gcodeview -x c \ |
| 5 |
// RUN: %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s |
| 6 |
// RUN: %clang -emit-llvm -S -g -gcodeview -Xclang -gsrc-hash=md5 \ |
| 7 |
// RUN: -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s |
| 8 |
// RUN: %clang -emit-llvm -S -g -gcodeview -Xclang -gsrc-hash=sha1 \ |
| 9 |
// RUN: -x c %S/Inputs/debug-info-file-checksum.c -o - \ |
| 10 |
// RUN: | FileCheck --check-prefix=SHA1 %s |
| 11 |
// RUN: %clang -emit-llvm -S -g -gcodeview -Xclang -gsrc-hash=sha256 \ |
| 12 |
// RUN: -x c %S/Inputs/debug-info-file-checksum.c -o - \ |
| 13 |
// RUN: | FileCheck --check-prefix=SHA256 %s |
| 14 |
// RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s |
| 15 |
// RUN: %clang -emit-llvm -S -gdwarf-5 -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s |
| 16 |
// RUN: %clang -emit-llvm -S -gdwarf-5 -Xclang -gsrc-hash=md5 -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s |
| 17 |
// RUN: %clang -emit-llvm -S -gdwarf-5 -Xclang -gsrc-hash=none -x c %S/Inputs/debug-info-file-checksum.c -o - | FileCheck %s --check-prefix=NONE |
| 18 |
|
| 19 |
// Check that "checksum" is created correctly for the compiled file. |
| 20 |
|
| 21 |
// CHECK: !DIFile(filename:{{.*}}, directory:{{.*}}, checksumkind: CSK_MD5, checksum: "a3b7d27af071accdeccaa933fc603608") |
| 22 |
// SHA1: !DIFile(filename:{{.*}}, directory:{{.*}}, checksumkind: CSK_SHA1, checksum: "6f6eeaba705ad6db6fbb05c2cbcf3cbb3e374bcd") |
| 23 |
// SHA256: !DIFile(filename:{{.*}}, directory:{{.*}}, checksumkind: CSK_SHA256, checksum: "2d49b53859e57898a0f8c16ff1fa4d99306b8ec28d65cf7577109761f0d56197") |
| 24 |
// NONE: !DIFile(filename:{{.*}}, directory:{{.*}}) |
| 25 |
|
| 26 |
// Ensure #line directives (in already pre-processed files) do not emit checksums |
| 27 |
// RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum-pre.cpp -o - | FileCheck %s --check-prefix NOCHECKSUM |
| 28 |
|
| 29 |
// NOCHECKSUM: !DIFile(filename: "{{.*}}code-coverage-filter1.h", directory: "{{[^"]*}}") |
| 30 |
// NOCHECKSUM: !DIFile(filename: "{{.*}}code-coverage-filter2.h", directory: "{{[^"]*}}") |
| 31 |
// NOCHECKSUM: !DIFile(filename: "{{.*}}debug-info-file-checksum.c", directory: "{{[^"]*}}") |
| 32 |
|
| 33 |
// Ensure #line directives without name do emit checksums |
| 34 |
// RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum-line.cpp -o - | FileCheck %s --check-prefix CHECKSUM |
| 35 |
|
| 36 |
// CHECKSUM: !DIFile(filename: "{{.*}}debug-info-file-checksum-line.cpp", directory:{{.*}}, checksumkind: CSK_MD5, checksum: "e13bca9b34ed822d596a519c9ce60995") |