brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 0eeecca Raw
82 lines · plain
1; RUN: llc -generate-arange-section < %s | FileCheck %s2 3; -- header --4; CHECK: .short 2 # DWARF Arange version number5; CHECK-NEXT: .long .Lcu_begin06; CHECK-NEXT: .byte 8 # Address Size (in bytes)7; CHECK-NEXT: .byte 0 # Segment Size (in bytes)8; -- alignment --9; CHECK-NEXT: .zero 4,25510 11; <data section> - it should have made one span covering all vars in this CU.12; CHECK-NEXT: .quad some_data13; CHECK-NEXT: .quad .Lsec_end0-some_data14 15; <other sections> - it should have made one span covering all vars in this CU.16; CHECK-NEXT: .quad some_other17; CHECK-NEXT: .quad .Lsec_end1-some_other18 19; <common symbols> - it should have made one span for each symbol.20; CHECK-NEXT: .quad some_bss21; CHECK-NEXT: .quad 422 23; <text section> - it should have made one span covering all functions in this CU.24; CHECK-NEXT: .quad .Lfunc_begin025; CHECK-NEXT: .quad .Lsec_end2-.Lfunc_begin026 27; -- finish --28; CHECK-NEXT: # ARange terminator29 30; -- source code --31; Generated from: "clang -c -g -emit-llvm"32;33; int some_data = 4;34; int some_bss;35; int some_other __attribute__ ((section ("strange+section"))) = 5;36; 37; void some_code()38; {39;    some_bss += some_data + some_other;40; }41 42source_filename = "test/DebugInfo/X86/dwarf-aranges.ll"43target triple = "x86_64-unknown-linux-gnu"44 45@some_data = global i32 4, align 4, !dbg !046@some_other = global i32 5, section "strange+section", align 4, !dbg !447@some_bss = common global i32 0, align 4, !dbg !648 49define void @some_code() !dbg !13 {50entry:51  %0 = load i32, ptr @some_data, align 4, !dbg !1652  %1 = load i32, ptr @some_other, align 4, !dbg !1653  %add = add nsw i32 %0, %1, !dbg !1654  %2 = load i32, ptr @some_bss, align 4, !dbg !1655  %add1 = add nsw i32 %2, %add, !dbg !1656  store i32 %add1, ptr @some_bss, align 4, !dbg !1657  ret void, !dbg !1758}59 60!llvm.dbg.cu = !{!8}61!llvm.module.flags = !{!11, !12}62 63!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())64!1 = !DIGlobalVariable(name: "some_data", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)65!2 = !DIFile(filename: "test.c", directory: "/home/kayamon")66!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)67!4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression())68!5 = !DIGlobalVariable(name: "some_other", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)69!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())70!7 = !DIGlobalVariable(name: "some_bss", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)71!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !9, globals: !10, imports: !9)72!9 = !{}73!10 = !{!0, !4, !6}74!11 = !{i32 2, !"Dwarf Version", i32 4}75!12 = !{i32 1, !"Debug Info Version", i32 3}76!13 = distinct !DISubprogram(name: "some_code", scope: !2, file: !2, line: 5, type: !14, isLocal: false, isDefinition: true, scopeLine: 6, virtualIndex: 6, isOptimized: false, unit: !8, retainedNodes: !9)77!14 = !DISubroutineType(types: !15)78!15 = !{null}79!16 = !DILocation(line: 7, scope: !13)80!17 = !DILocation(line: 8, scope: !13)81 82