xref: /llvm-project/llvm/test/DebugInfo/X86/c-type-units.ll (revision 5e92cbddb901453ecd04138460c546b96d29097d)
1
2; RUN: llc -o - %s -filetype=obj -O0 -debugger-tune=lldb -generate-type-units -mtriple=x86_64-unknown-linux-gnu | llvm-dwarfdump -debug-types - | FileCheck %s
3
4; struct foo {
5; } f;
6
7; no known LLVM frontends produce appropriate unique identifiers for C types,
8; so we don't produce type units for them
9; CHECK-NOT: DW_TAG_type_unit
10
11source_filename = "test/DebugInfo/X86/c-type-units.ll"
12
13%struct.foo = type {}
14
15@f = common global %struct.foo zeroinitializer, align 1, !dbg !0
16
17!llvm.dbg.cu = !{!5}
18!llvm.module.flags = !{!7, !8}
19!llvm.ident = !{!9}
20
21!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
22!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
23!2 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo")
24!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !2, line: 1, align: 8, elements: !4)
25!4 = !{}
26!5 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !6, imports: !4)
27!6 = !{!0}
28!7 = !{i32 2, !"Dwarf Version", i32 4}
29!8 = !{i32 1, !"Debug Info Version", i32 3}
30!9 = !{!"clang version 3.5 "}
31
32