| 1 |
source_filename = "ThreadLocalStorage.cpp" |
| 2 |
target triple = "x86_64-pc-linux-gnu" |
| 3 |
|
| 4 |
@TGlobal = dso_local thread_local global i32 0, align 4, !dbg !0 |
| 5 |
@NGlobal = dso_local global i32 1, align 4, !dbg !5 |
| 6 |
@_ZZ4testvE6TLocal = internal thread_local global i32 0, align 4, !dbg !8 |
| 7 |
|
| 8 |
define dso_local void @_Z4testv() !dbg !10 { |
| 9 |
entry: |
| 10 |
%NLocal = alloca i32, align 4 |
| 11 |
%0 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @TGlobal), !dbg !22 |
| 12 |
store i32 1, ptr %0, align 4 |
| 13 |
#dbg_declare(ptr %NLocal, !24, !DIExpression(), !25) |
| 14 |
store i32 0, ptr %NLocal, align 4, !dbg !25 |
| 15 |
store i32 2, ptr @NGlobal, align 4 |
| 16 |
ret void |
| 17 |
} |
| 18 |
|
| 19 |
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) |
| 20 |
|
| 21 |
!llvm.dbg.cu = !{!2} |
| 22 |
!llvm.module.flags = !{!14, !15} |
| 23 |
|
| 24 |
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) |
| 25 |
!1 = distinct !DIGlobalVariable(name: "TGlobal", scope: !2, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true) |
| 26 |
!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, emissionKind: FullDebug, globals: !4) |
| 27 |
!3 = !DIFile(filename: "ThreadLocalStorage.cpp", directory: "") |
| 28 |
!4 = !{!0, !5, !8} |
| 29 |
!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression()) |
| 30 |
!6 = distinct !DIGlobalVariable(name: "NGlobal", scope: !2, file: !3, line: 2, type: !7, isLocal: false, isDefinition: true) |
| 31 |
!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 32 |
!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression()) |
| 33 |
!9 = distinct !DIGlobalVariable(name: "TLocal", scope: !10, file: !3, line: 4, type: !7, isLocal: true, isDefinition: true) |
| 34 |
!10 = distinct !DISubprogram(name: "test", scope: !3, file: !3, line: 3, type: !11, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !13) |
| 35 |
!11 = !DISubroutineType(types: !12) |
| 36 |
!12 = !{null} |
| 37 |
!13 = !{} |
| 38 |
!14 = !{i32 7, !"Dwarf Version", i32 5} |
| 39 |
!15 = !{i32 2, !"Debug Info Version", i32 3} |
| 40 |
!22 = !DILocation(line: 5, scope: !10) |
| 41 |
!24 = !DILocalVariable(name: "NLocal", scope: !10, file: !3, line: 7, type: !7) |
| 42 |
!25 = !DILocation(line: 7, scope: !10) |