Eric Christopher | 02dbadb | 2014-02-14 01:26:55 +0000 | [diff] [blame] | 1 | ; RUN: llc -generate-arange-section < %s | FileCheck %s |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 2 | |
Rafael Espindola | 14862d3 | 2015-03-09 20:09:58 +0000 | [diff] [blame^] | 3 | ; CHECK: .Ldebug_end0: |
| 4 | ; CHECK-NEXT: .section .debug_aranges,"",@progbits |
| 5 | |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 6 | ; First CU |
Rafael Espindola | 14862d3 | 2015-03-09 20:09:58 +0000 | [diff] [blame^] | 7 | ; CHECK-NEXT: .long 44 # Length of ARange Set |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 8 | ; CHECK-NEXT: .short 2 # DWARF Arange version number |
| 9 | ; CHECK-NEXT: .long .L.debug_info_begin0 # Offset Into Debug Info Section |
| 10 | ; CHECK-NEXT: .byte 8 # Address Size (in bytes) |
| 11 | ; CHECK-NEXT: .byte 0 # Segment Size (in bytes) |
Benjamin Kramer | 8a68ab3 | 2014-01-07 19:28:14 +0000 | [diff] [blame] | 12 | ; CHECK-NEXT: .zero 4,255 |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 13 | ; CHECK-NEXT: .quad kittens |
Rafael Espindola | c606bfe | 2014-10-21 01:17:30 +0000 | [diff] [blame] | 14 | ; CHECK-NEXT: .quad rainbows-kittens |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 15 | ; CHECK-NEXT: .quad 0 # ARange terminator |
| 16 | ; CHECK-NEXT: .quad 0 |
| 17 | |
| 18 | ; Second CU |
| 19 | ; CHECK-NEXT: .long 44 # Length of ARange Set |
| 20 | ; CHECK-NEXT: .short 2 # DWARF Arange version number |
| 21 | ; CHECK-NEXT: .long .L.debug_info_begin1 # Offset Into Debug Info Section |
| 22 | ; CHECK-NEXT: .byte 8 # Address Size (in bytes) |
| 23 | ; CHECK-NEXT: .byte 0 # Segment Size (in bytes) |
Benjamin Kramer | 8a68ab3 | 2014-01-07 19:28:14 +0000 | [diff] [blame] | 24 | ; CHECK-NEXT: .zero 4,255 |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 25 | ; CHECK-NEXT: .quad rainbows |
Rafael Espindola | c606bfe | 2014-10-21 01:17:30 +0000 | [diff] [blame] | 26 | ; CHECK-NEXT: .quad .Ldebug_end0-rainbows |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 27 | ; CHECK-NEXT: .quad 0 # ARange terminator |
| 28 | ; CHECK-NEXT: .quad 0 |
| 29 | |
| 30 | |
| 31 | ; Generated from: clang -c -g -emit-llvm |
| 32 | ; llvm-link test1.bc test2.bc -o test.bc |
| 33 | ; test1.c: int kittens = 4; |
| 34 | ; test2.c: int rainbows = 5; |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | ; ModuleID = 'test.bc' |
| 40 | target triple = "x86_64-unknown-linux-gnu" |
| 41 | |
| 42 | @kittens = global i32 4, align 4 |
| 43 | @rainbows = global i32 5, align 4 |
| 44 | |
| 45 | !llvm.dbg.cu = !{!0, !7} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 46 | !llvm.module.flags = !{!12, !13} |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 47 | |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 48 | !0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !2, subprograms: !2, globals: !3, imports: !2) |
| 49 | !1 = !MDFile(filename: "test1.c", directory: "/home/kayamon") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 50 | !2 = !{} |
| 51 | !3 = !{!4} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 52 | !4 = !MDGlobalVariable(name: "kittens", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @kittens) |
| 53 | !5 = !MDFile(filename: "test1.c", directory: "/home/kayamon") |
| 54 | !6 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 55 | !7 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: 0, file: !8, enums: !2, retainedTypes: !2, subprograms: !2, globals: !9, imports: !2) |
| 56 | !8 = !MDFile(filename: "test2.c", directory: "/home/kayamon") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 57 | !9 = !{!10} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 58 | !10 = !MDGlobalVariable(name: "rainbows", line: 1, isLocal: false, isDefinition: true, scope: null, file: !11, type: !6, variable: i32* @rainbows) |
| 59 | !11 = !MDFile(filename: "test2.c", directory: "/home/kayamon") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 60 | !12 = !{i32 2, !"Dwarf Version", i32 4} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 61 | !13 = !{i32 1, !"Debug Info Version", i32 3} |