xref: /llvm-project/llvm/test/MC/MachO/ARM/no-tls-assert.ll (revision 270f63b84a612dfa438df3d59903bb76fa0c7740)
1; RUN: llc -filetype=obj -o - %s | llvm-objdump --section-headers - | FileCheck %s
2; This should not trigger the "Creating regular section after DWARF" assert.
3; CHECK: __text
4; CHECK: __thread_ptr  00000004
5target triple = "thumbv7-apple-ios9.0.0"
6
7@b = external thread_local global i32
8define ptr @func(i32 %a) !dbg !9 {
9  ret ptr @b
10}
11
12!llvm.dbg.cu = !{!0}
13!llvm.module.flags = !{!3, !4, !5, !6, !7}
14
15!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
16!1 = !DIFile(filename: "r.ii", directory: "/")
17!2 = !{}
18!3 = !{i32 2, !"Dwarf Version", i32 4}
19!4 = !{i32 2, !"Debug Info Version", i32 3}
20!5 = !{i32 1, !"wchar_size", i32 4}
21!6 = !{i32 1, !"min_enum_size", i32 4}
22!7 = !{i32 1, !"PIC Level", i32 2}
23!9 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 4, type: !10, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
24!10 = !DISubroutineType(types: !11)
25!11 = !{null, !12}
26!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
27!13 = !DILocalVariable(name: "a", arg: 1, scope: !9, file: !1, line: 4, type: !12)
28!14 = !DIExpression()
29