1; REQUIRES: object-emission
2
3; RUN: llc -o - %s -filetype=obj -O0 -generate-dwarf-pub-sections=Disable -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-dump=types - | FileCheck %s
4
5; struct foo {
6; } f;
7
8; no known LLVM frontends produce appropriate unique identifiers for C types,
9; so we don't produce type units for them
10; CHECK-NOT: DW_TAG_type_unit
11
12%struct.foo = type {}
13
14@f = common global %struct.foo zeroinitializer, align 1
15
16!llvm.dbg.cu = !{!0}
17!llvm.module.flags = !{!7, !8}
18!llvm.ident = !{!9}
19
20!0 = !{!"0x11\0012\00clang version 3.5 \000\00\000\00\000", !1, !2, !2, !2, !3, !2} ; [ DW_TAG_compile_unit ] [/tmp/dbginfo/simple.c] [DW_LANG_C99]
21!1 = !{!"simple.c", !"/tmp/dbginfo"}
22!2 = !{}
23!3 = !{!4}
24!4 = !{!"0x34\00f\00f\00\002\000\001", null, !5, !6, %struct.foo* @f, null} ; [ DW_TAG_variable ] [f] [line 2] [def]
25!5 = !{!"0x29", !1}          ; [ DW_TAG_file_type ] [/tmp/dbginfo/simple.c]
26!6 = !{!"0x13\00foo\001\000\008\000\000\000", !1, null, null, !2, null, null, null} ; [ DW_TAG_structure_type ] [foo] [line 1, size 0, align 8, offset 0] [def] [from ]
27!7 = !{i32 2, !"Dwarf Version", i32 4}
28!8 = !{i32 1, !"Debug Info Version", i32 2}
29!9 = !{!"clang version 3.5 "}
30