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 30; Generated from: clang -c -g -emit-llvm 31; llvm-link test1.bc test2.bc -o test.bc 32; test1.c: int kittens = 4; 33; test2.c: int rainbows = 5; 34 35 36 37 38; ModuleID = 'test.bc' 39target triple = "x86_64-unknown-linux-gnu" 40 41@kittens = global i32 4, align 4 42@rainbows = global i32 5, align 4 43 44!llvm.dbg.cu = !{!0, !7} 45!llvm.module.flags = !{!12, !13} 46 47!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2) 48!1 = !DIFile(filename: "test1.c", directory: "/home/kayamon") 49!2 = !{} 50!3 = !{!4} 51!4 = !DIGlobalVariable(name: "kittens", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @kittens) 52!5 = !DIFile(filename: "test1.c", directory: "/home/kayamon") 53!6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 54!7 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, globals: !9, imports: !2) 55!8 = !DIFile(filename: "test2.c", directory: "/home/kayamon") 56!9 = !{!10} 57!10 = !DIGlobalVariable(name: "rainbows", line: 1, isLocal: false, isDefinition: true, scope: null, file: !11, type: !6, variable: i32* @rainbows) 58!11 = !DIFile(filename: "test2.c", directory: "/home/kayamon") 59!12 = !{i32 2, !"Dwarf Version", i32 4} 60!13 = !{i32 1, !"Debug Info Version", i32 3} 61