diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGen/Inputs/debug-info-file-checksum-line.cpp | 9 | ||||
| -rw-r--r-- | clang/test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp | 10 | ||||
| -rw-r--r-- | clang/test/CodeGen/debug-info-file-checksum.c | 12 |
3 files changed, 31 insertions, 0 deletions
diff --git a/clang/test/CodeGen/Inputs/debug-info-file-checksum-line.cpp b/clang/test/CodeGen/Inputs/debug-info-file-checksum-line.cpp new file mode 100644 index 00000000000..e5fe98263a1 --- /dev/null +++ b/clang/test/CodeGen/Inputs/debug-info-file-checksum-line.cpp @@ -0,0 +1,9 @@ +int foo(int x) { + return x+1; +} + +#line 100 +void test1() {} + +#line 200 +void test2() {} diff --git a/clang/test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp b/clang/test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp new file mode 100644 index 00000000000..11029e6b7a5 --- /dev/null +++ b/clang/test/CodeGen/Inputs/debug-info-file-checksum-pre.cpp @@ -0,0 +1,10 @@ +#line 1 "F:\\svn\\clang\\test\\CodeGen\\Inputs\\debug-info-file-checksum.c" +#line 1 "f:\\svn\\clang\\test\\codegen\\inputs\\code-coverage-filter1.h" +void test1() {} +#line 2 "F:\\svn\\clang\\test\\CodeGen\\Inputs\\debug-info-file-checksum.c" +#line 1 "f:\\svn\\clang\\test\\codegen\\inputs\\code-coverage-filter2.h" +void test2() {} +#line 3 "F:\\svn\\clang\\test\\CodeGen\\Inputs\\debug-info-file-checksum.c" +int foo(int x) { + return x+1; +} diff --git a/clang/test/CodeGen/debug-info-file-checksum.c b/clang/test/CodeGen/debug-info-file-checksum.c index d644aac0614..273a10b0678 100644 --- a/clang/test/CodeGen/debug-info-file-checksum.c +++ b/clang/test/CodeGen/debug-info-file-checksum.c @@ -4,3 +4,15 @@ // Check that "checksum" is created correctly for the compiled file. // CHECK: !DIFile(filename:{{.*}}, directory:{{.*}}, checksumkind: CSK_MD5, checksum: "a3b7d27af071accdeccaa933fc603608") + +// Ensure #line directives (in already pre-processed files) do not emit checksums +// RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum-pre.cpp -o - | FileCheck %s --check-prefix NOCHECKSUM + +// NOCHECKSUM: !DIFile(filename: "{{.*}}code-coverage-filter1.h", directory: "{{[^"]*}}") +// NOCHECKSUM: !DIFile(filename: "{{.*}}code-coverage-filter2.h", directory: "{{[^"]*}}") +// NOCHECKSUM: !DIFile(filename: "{{.*}}debug-info-file-checksum.c", directory: "{{[^"]*}}") + +// Ensure #line directives without name do emit checksums +// RUN: %clang -emit-llvm -S -g -gcodeview -x c %S/Inputs/debug-info-file-checksum-line.cpp -o - | FileCheck %s --check-prefix CHECKSUM + +// CHECKSUM: !DIFile(filename: "{{.*}}debug-info-file-checksum-line.cpp", directory:{{.*}}, checksumkind: CSK_MD5, checksum: "7b568574d0e3c56c28e5e0234d1f4a06") |

