1; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
2
3; From source:
4; typedef void x;
5; x *y;
6
7; Check that a typedef with no DW_AT_type is produced. The absence of a type is used to imply the 'void' type.
8
9; CHECK: DW_TAG_typedef
10; CHECK-NOT: DW_AT_type
11; CHECK: {{DW_TAG|NULL}}
12
13source_filename = "test/DebugInfo/Generic/typedef.ll"
14
15@y = global i8* null, align 8, !dbg !0
16
17!llvm.dbg.cu = !{!5}
18!llvm.module.flags = !{!8, !9}
19!llvm.ident = !{!10}
20
21!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
22!1 = !DIGlobalVariable(name: "y", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
23!2 = !DIFile(filename: "typedef.cpp", directory: "/tmp/dbginfo")
24!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
25!4 = !DIDerivedType(tag: DW_TAG_typedef, name: "x", file: !2, line: 1, baseType: null)
26!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, retainedTypes: !6, globals: !7, imports: !6)
27!6 = !{}
28!7 = !{!0}
29!8 = !{i32 2, !"Dwarf Version", i32 4}
30!9 = !{i32 1, !"Debug Info Version", i32 3}
31!10 = !{!"clang version 3.5.0 "}
32
33