summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorScott Linder <scott@scottlinder.com>2018-02-12 19:45:54 +0000
committerScott Linder <scott@scottlinder.com>2018-02-12 19:45:54 +0000
commit7160384d40ac5025c5ab23cd898b5370749c66a1 (patch)
treea917fb3bd760c42467541559e913a5b09de8094c /llvm/test/Bitcode
parent4a4f35f32411abb73360247e53d59e1fea1ca7c8 (diff)
downloadbcm5719-llvm-7160384d40ac5025c5ab23cd898b5370749c66a1.tar.gz
bcm5719-llvm-7160384d40ac5025c5ab23cd898b5370749c66a1.zip
[DebugInfo] Unify ChecksumKind and Checksum value in DIFile
Rather than encode the absence of a checksum with a Kind variant, instead put both the kind and value in a struct and wrap it in an Optional. Differential Revision: http://reviews.llvm.org/D43043 llvm-svn: 324928
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/upgrade-dbg-checksum.ll19
-rw-r--r--llvm/test/Bitcode/upgrade-dbg-checksum.ll.bcbin0 -> 1164 bytes
2 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/upgrade-dbg-checksum.ll b/llvm/test/Bitcode/upgrade-dbg-checksum.ll
new file mode 100644
index 00000000000..586cde32658
--- /dev/null
+++ b/llvm/test/Bitcode/upgrade-dbg-checksum.ll
@@ -0,0 +1,19 @@
+; Test that DIFile(checksumkind, checksum) representation in Bitcode does
+; not change.
+;
+; RUN: llvm-dis < %s.bc | FileCheck %s
+; RUN: verify-uselistorder < %s.bc
+
+!llvm.dbg.cu = !{!1, !2, !3}
+!llvm.module.flags = !{!7}
+
+!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !4, producer: "clang version 5.0.1 (tags/RELEASE_501/final)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !5, producer: "clang version 5.0.1 (tags/RELEASE_501/final)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
+!3 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6, producer: "clang version 5.0.1 (tags/RELEASE_501/final)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
+; CHECK: !DIFile(filename: "a.c", directory: "/test")
+!4 = !DIFile(filename: "a.c", directory: "/test", checksumkind: CSK_None, checksum: "")
+; CHECK: !DIFile(filename: "b.h", directory: "/test", checksumkind: CSK_MD5, checksum: "595f44fec1e92a71d3e9e77456ba80d1")
+!5 = !DIFile(filename: "b.h", directory: "/test", checksumkind: CSK_MD5, checksum: "595f44fec1e92a71d3e9e77456ba80d1")
+; CHECK: !DIFile(filename: "c.h", directory: "/test", checksumkind: CSK_SHA1, checksum: "d5db29cd03a2ed055086cef9c31c252b4587d6d0")
+!6 = !DIFile(filename: "c.h", directory: "/test", checksumkind: CSK_SHA1, checksum: "d5db29cd03a2ed055086cef9c31c252b4587d6d0")
+!7 = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/Bitcode/upgrade-dbg-checksum.ll.bc b/llvm/test/Bitcode/upgrade-dbg-checksum.ll.bc
new file mode 100644
index 00000000000..feb0b68f493
--- /dev/null
+++ b/llvm/test/Bitcode/upgrade-dbg-checksum.ll.bc
Binary files differ
OpenPOWER on IntegriCloud