1 ; RUN: llc -generate-arange-section < %s | FileCheck %s 2 3 ; CHECK: .section .debug_aranges,"",@progbits 4 5 ; First CU 6 ; CHECK-NEXT: .long 44 # Length of ARange Set 7 ; CHECK-NEXT: .short 2 # DWARF Arange version number 8 ; CHECK-NEXT: .long .Lcu_begin0 # Offset Into Debug Info Section 9 ; CHECK-NEXT: .byte 8 # Address Size (in bytes) 10 ; CHECK-NEXT: .byte 0 # Segment Size (in bytes) 11 ; CHECK-NEXT: .zero 4,255 12 ; CHECK-NEXT: .quad kittens 13 ; CHECK-NEXT: .quad rainbows-kittens 14 ; CHECK-NEXT: .quad 0 # ARange terminator 15 ; CHECK-NEXT: .quad 0 16 17 ; Second CU 18 ; CHECK-NEXT: .long 44 # Length of ARange Set 19 ; CHECK-NEXT: .short 2 # DWARF Arange version number 20 ; CHECK-NEXT: .long .Lcu_begin1 # Offset Into Debug Info Section 21 ; CHECK-NEXT: .byte 8 # Address Size (in bytes) 22 ; CHECK-NEXT: .byte 0 # Segment Size (in bytes) 23 ; CHECK-NEXT: .zero 4,255 24 ; CHECK-NEXT: .quad rainbows 25 ; CHECK-NEXT: .quad .Lsec_end0-rainbows 26 ; CHECK-NEXT: .quad 0 # ARange terminator 27 ; CHECK-NEXT: .quad 0 28 29 ; Generated from: clang -c -g -emit-llvm 30 ; llvm-link test1.bc test2.bc -o test.bc 31 ; test1.c: int kittens = 4; 32 ; test2.c: int rainbows = 5; 33 34 ; ModuleID = 'test.bc' 35 source_filename = "test/DebugInfo/X86/multiple-aranges.ll" 36 target triple = "x86_64-unknown-linux-gnu" 37 38 @kittens = global i32 4, align 4, !dbg !0 39 @rainbows = global i32 5, align 4, !dbg !4 40 41 !llvm.dbg.cu = !{!7, !10} 42 !llvm.module.flags = !{!12, !13} 43 44 !0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 45 !1 = !DIGlobalVariable(name: "kittens", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true) 46 !2 = !DIFile(filename: "test1.c", directory: "/home/kayamon") 47 !3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 48 !4 = !DIGlobalVariableExpression(var: !5, expr: !DIExpression()) 49 !5 = !DIGlobalVariable(name: "rainbows", scope: null, file: !6, line: 1, type: !3, isLocal: false, isDefinition: true) 50 !6 = !DIFile(filename: "test2.c", directory: "/home/kayamon") 51 !7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !9, imports: !8) 52 !8 = !{} 53 !9 = !{!0} 54 !10 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !11, imports: !8) 55 !11 = !{!4} 56 !12 = !{i32 2, !"Dwarf Version", i32 4} 57 !13 = !{i32 1, !"Debug Info Version", i32 3} 58 59