xref: /llvm-project/llvm/test/DebugInfo/AArch64/tls-at-location.ll (revision 5a288fa32e0c91b211e39f3e370255916902f898)
18e422b84SLei Liu; RUN: llc -filetype=obj -mtriple=aarch64--linux-gnu -o - %s | llvm-dwarfdump -v - | FileCheck %s
28e422b84SLei Liu;
38e422b84SLei Liu; CHECK: .debug_info contents:
48e422b84SLei Liu; CHECK: DW_TAG_variable
58e422b84SLei Liu; CHECK-NOT: DW_AT_location
68e422b84SLei Liu
78e422b84SLei Liu@var = thread_local global i32 0, align 4, !dbg !0
88e422b84SLei Liu
98e422b84SLei Liu; Function Attrs: noinline nounwind optnone
108e422b84SLei Liudefine i32 @foo() #0 !dbg !11 {
118e422b84SLei Liuentry:
12*5a288fa3SNikita Popov  %0 = load i32, ptr @var, align 4, !dbg !14
138e422b84SLei Liu  ret i32 %0, !dbg !15
148e422b84SLei Liu}
158e422b84SLei Liu
168e422b84SLei Liuattributes #0 = { noinline nounwind optnone }
178e422b84SLei Liu
188e422b84SLei Liu!llvm.dbg.cu = !{!2}
198e422b84SLei Liu!llvm.module.flags = !{!7, !8, !9}
208e422b84SLei Liu!llvm.ident = !{!10}
218e422b84SLei Liu
228e422b84SLei Liu!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
238e422b84SLei Liu!1 = distinct !DIGlobalVariable(name: "var", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
24693d39ddSJames Y Knight!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
258e422b84SLei Liu!3 = !DIFile(filename: "tls-at-location.c", directory: "/home/lliu0/llvm/tls-at-location/DebugInfo/AArch64")
268e422b84SLei Liu!4 = !{}
278e422b84SLei Liu!5 = !{!0}
288e422b84SLei Liu!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
298e422b84SLei Liu!7 = !{i32 2, !"Dwarf Version", i32 4}
308e422b84SLei Liu!8 = !{i32 2, !"Debug Info Version", i32 3}
318e422b84SLei Liu!9 = !{i32 1, !"wchar_size", i32 4}
32693d39ddSJames Y Knight!10 = !{!"clang version 7.0.0"}
338e422b84SLei Liu!11 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 3, type: !12, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !2)
348e422b84SLei Liu!12 = !DISubroutineType(types: !13)
358e422b84SLei Liu!13 = !{!6}
368e422b84SLei Liu!14 = !DILocation(line: 4, column: 10, scope: !11)
378e422b84SLei Liu!15 = !DILocation(line: 4, column: 3, scope: !11)
38