summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-file-checksum.c
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2019-05-21 19:40:28 +0000
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>2019-05-21 19:40:28 +0000
commit047e65db77571bb586429a8094b3dfa43cecd449 (patch)
treef82cd9abcbd0023fe8625bd40a16ed05378ef404 /clang/test/CodeGen/debug-info-file-checksum.c
parentb07176666b8ec276902d207f8ee0f832323a2128 (diff)
downloadbcm5719-llvm-047e65db77571bb586429a8094b3dfa43cecd449.tar.gz
bcm5719-llvm-047e65db77571bb586429a8094b3dfa43cecd449.zip
[DebugInfo] Don't emit checksums when compiling a preprocessed CPP
Fixes PR41215 Differential Revision: https://reviews.llvm.org/D60283 llvm-svn: 361296
Diffstat (limited to 'clang/test/CodeGen/debug-info-file-checksum.c')
-rw-r--r--clang/test/CodeGen/debug-info-file-checksum.c12
1 files changed, 12 insertions, 0 deletions
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")
OpenPOWER on IntegriCloud