xref: /llvm-project/llvm/test/DebugInfo/X86/split-dwarf-dwo-hash.ll (revision 0e4c7fabd3587c7d95fa4733e4a9001a0bae737f)
1; RUN: rm -rf %t && mkdir -p %t
2; RUN: llc -split-dwarf-file=foo.dwo  %s -filetype=obj -o %t/a.o
3; RUN: llc -split-dwarf-file=bar.dwo  %s -filetype=obj -o %t/b.o
4; RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s
5
6; CHECK: {{.*}}a.o: file format elf64-x86-64
7; CHECK: 0x00000000: Compile Unit: {{.*}}, DWO_id = [[HASH:0x[0-9a-f]*]]
8; CHECK: {{.*}}b.o: file format elf64-x86-64
9; CHECK-NOT: DWO_id = [[HASH]]
10
11target triple = "x86_64-pc-linux"
12
13; Function Attrs: noinline nounwind uwtable
14define void @_Z1av() !dbg !9 {
15entry:
16  ret void, !dbg !12
17}
18
19!llvm.dbg.cu = !{!0}
20!llvm.ident = !{!5}
21!llvm.module.flags = !{!6, !7, !8}
22
23!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 5.0.0 (trunk 304107) (llvm/trunk 304109)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
24!1 = !DIFile(filename: "a.cpp", directory: "/tmp")
25!2 = !{}
26!5 = !{!"clang version 5.0.0 (trunk 304107) (llvm/trunk 304109)"}
27!6 = !{i32 2, !"Dwarf Version", i32 5}
28!7 = !{i32 2, !"Debug Info Version", i32 3}
29!8 = !{i32 1, !"wchar_size", i32 4}
30!9 = distinct !DISubprogram(name: "a", linkageName: "_Z1av", scope: !1, file: !1, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
31!10 = !DISubroutineType(types: !11)
32!11 = !{null}
33!12 = !DILocation(line: 2, column: 1, scope: !9)
34