xref: /llvm-project/llvm/test/DebugInfo/AArch64/tls-at-location.ll (revision 5a288fa32e0c91b211e39f3e370255916902f898)
1; RUN: llc -filetype=obj -mtriple=aarch64--linux-gnu -o - %s | llvm-dwarfdump -v - | FileCheck %s
2;
3; CHECK: .debug_info contents:
4; CHECK: DW_TAG_variable
5; CHECK-NOT: DW_AT_location
6
7@var = thread_local global i32 0, align 4, !dbg !0
8
9; Function Attrs: noinline nounwind optnone
10define i32 @foo() #0 !dbg !11 {
11entry:
12  %0 = load i32, ptr @var, align 4, !dbg !14
13  ret i32 %0, !dbg !15
14}
15
16attributes #0 = { noinline nounwind optnone }
17
18!llvm.dbg.cu = !{!2}
19!llvm.module.flags = !{!7, !8, !9}
20!llvm.ident = !{!10}
21
22!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
23!1 = distinct !DIGlobalVariable(name: "var", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
24!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)
25!3 = !DIFile(filename: "tls-at-location.c", directory: "/home/lliu0/llvm/tls-at-location/DebugInfo/AArch64")
26!4 = !{}
27!5 = !{!0}
28!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
29!7 = !{i32 2, !"Dwarf Version", i32 4}
30!8 = !{i32 2, !"Debug Info Version", i32 3}
31!9 = !{i32 1, !"wchar_size", i32 4}
32!10 = !{!"clang version 7.0.0"}
33!11 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 3, type: !12, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !2)
34!12 = !DISubroutineType(types: !13)
35!13 = !{!6}
36!14 = !DILocation(line: 4, column: 10, scope: !11)
37!15 = !DILocation(line: 4, column: 3, scope: !11)
38