• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=x86_64-unknown-linux-gnu -filetype=obj < %s \
2; RUN: 	    | llvm-dwarfdump -v -debug-info - | FileCheck %s
3
4; CHECK: DW_AT_location [DW_FORM_exprloc] (DW_OP_addrx 0x0)
5
6%struct.foo = type { i32 }
7
8@f = dso_local global %struct.foo zeroinitializer, align 4, !dbg !0
9
10!llvm.dbg.cu = !{!2}
11!llvm.module.flags = !{!10, !11, !12}
12!llvm.ident = !{!13}
13
14!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
15!1 = distinct !DIGlobalVariable(name: "f", scope: !2, file: !3, line: 5, type: !6, isLocal: false, isDefinition: true)
16!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 8.0.0 (trunk 344833) (llvm/trunk 344837)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: GNU)
17!3 = !DIFile(filename: "loc.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch", checksumkind: CSK_MD5, checksum: "e579a1a06fae14a4526216e905198a01")
18!4 = !{}
19!5 = !{!0}
20!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !3, line: 1, size: 32, flags: DIFlagTypePassByValue, elements: !7, identifier: "_ZTS3foo")
21!7 = !{!8}
22!8 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !6, file: !3, line: 2, baseType: !9, size: 32)
23!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
24!10 = !{i32 2, !"Dwarf Version", i32 5}
25!11 = !{i32 2, !"Debug Info Version", i32 3}
26!12 = !{i32 1, !"wchar_size", i32 4}
27!13 = !{!"clang version 8.0.0 (trunk 344833) (llvm/trunk 344837)"}
28