• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
2; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
3
4@a = global i32 0, align 4
5@b = global i64 0, align 8
6@c = global i32 0, align 4
7
8!llvm.dbg.cu = !{!0}
9!llvm.module.flags = !{!23}
10
11!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157269) (llvm/trunk 157264)", isOptimized: false, emissionKind: 0, file: !22, enums: !1, retainedTypes: !15, subprograms: !15, globals: !17, imports:  !15)
12!1 = !{!3, !8, !12}
13!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", line: 1, size: 32, align: 32, file: !4, baseType: !5, elements: !6)
14!4 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
15!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
16!6 = !{!7}
17!7 = !DIEnumerator(name: "A1", value: 1) ; [ DW_TAG_enumerator ]
18!8 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "B", line: 2, size: 64, align: 64, file: !4, baseType: !9, elements: !10)
19!9 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
20!10 = !{!11}
21!11 = !DIEnumerator(name: "B1", value: 1) ; [ DW_TAG_enumerator ]
22!12 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "C", line: 3, size: 32, align: 32, file: !4, elements: !13)
23!13 = !{!14}
24!14 = !DIEnumerator(name: "C1", value: 1) ; [ DW_TAG_enumerator ]
25!15 = !{}
26!17 = !{!19, !20, !21}
27!19 = !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !4, type: !3, variable: i32* @a)
28!20 = !DIGlobalVariable(name: "b", line: 5, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8, variable: i64* @b)
29!21 = !DIGlobalVariable(name: "c", line: 6, isLocal: false, isDefinition: true, scope: null, file: !4, type: !12, variable: i32* @c)
30!22 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
31
32; CHECK: DW_TAG_enumeration_type [{{.*}}]
33; CHECK: DW_AT_type [DW_FORM_ref4]
34; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true)
35; CHECK: DW_AT_name [DW_FORM_strp]      ( .debug_str[{{.*}}] = "A")
36
37; CHECK: DW_TAG_enumeration_type [{{.*}}] *
38; CHECK: DW_AT_type [DW_FORM_ref4]
39; CHECK: DW_AT_enum_class [DW_FORM_flag_present] (true)
40; CHECK: DW_AT_name [DW_FORM_strp]          ( .debug_str[{{.*}}] = "B")
41
42; CHECK: DW_TAG_enumeration_type [6]
43; CHECK-NOT: DW_AT_enum_class
44; CHECK: DW_AT_name [DW_FORM_strp]      ( .debug_str[{{.*}}] = "C")
45!23 = !{i32 1, !"Debug Info Version", i32 3}
46