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 | f2b408c | 2015-03-23 21:22:04 +0000 | [diff] [blame] | 3 | ; CHECK: .section .debug_aranges,"",@progbits |
Rafael Espindola | 14862d3 | 2015-03-09 20:09:58 +0000 | [diff] [blame] | 4 | |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 5 | ; First CU |
Rafael Espindola | 14862d3 | 2015-03-09 20:09:58 +0000 | [diff] [blame] | 6 | ; CHECK-NEXT: .long 44 # Length of ARange Set |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 7 | ; CHECK-NEXT: .short 2 # DWARF Arange version number |
Rafael Espindola | fcc2821 | 2015-03-10 03:58:36 +0000 | [diff] [blame] | 8 | ; CHECK-NEXT: .long .Lcu_begin0 # Offset Into Debug Info Section |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 9 | ; CHECK-NEXT: .byte 8 # Address Size (in bytes) |
| 10 | ; CHECK-NEXT: .byte 0 # Segment Size (in bytes) |
Benjamin Kramer | 8a68ab3 | 2014-01-07 19:28:14 +0000 | [diff] [blame] | 11 | ; CHECK-NEXT: .zero 4,255 |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 12 | ; CHECK-NEXT: .quad kittens |
Rafael Espindola | c606bfe | 2014-10-21 01:17:30 +0000 | [diff] [blame] | 13 | ; CHECK-NEXT: .quad rainbows-kittens |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 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 |
Rafael Espindola | fcc2821 | 2015-03-10 03:58:36 +0000 | [diff] [blame] | 20 | ; CHECK-NEXT: .long .Lcu_begin1 # Offset Into Debug Info Section |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 21 | ; CHECK-NEXT: .byte 8 # Address Size (in bytes) |
| 22 | ; CHECK-NEXT: .byte 0 # Segment Size (in bytes) |
Benjamin Kramer | 8a68ab3 | 2014-01-07 19:28:14 +0000 | [diff] [blame] | 23 | ; CHECK-NEXT: .zero 4,255 |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 24 | ; CHECK-NEXT: .quad rainbows |
Rafael Espindola | f2b408c | 2015-03-23 21:22:04 +0000 | [diff] [blame] | 25 | ; CHECK-NEXT: .quad .Lsec_end0-rainbows |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 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' |
| 39 | target 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} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 45 | !llvm.module.flags = !{!12, !13} |
Richard Mitton | 21101b3 | 2013-09-19 23:21:01 +0000 | [diff] [blame] | 46 | |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 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) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 48 | !1 = !DIFile(filename: "test1.c", directory: "/home/kayamon") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 49 | !2 = !{} |
| 50 | !3 = !{!4} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 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) |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 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) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 55 | !8 = !DIFile(filename: "test2.c", directory: "/home/kayamon") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 56 | !9 = !{!10} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 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") |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 59 | !12 = !{i32 2, !"Dwarf Version", i32 4} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 60 | !13 = !{i32 1, !"Debug Info Version", i32 3} |