blob: a3f66bb6d34b2bf7f165a06a4b78d0bcd7cfd59a [file] [log] [blame]
Eric Christopher02dbadb2014-02-14 01:26:55 +00001; RUN: llc -generate-arange-section < %s | FileCheck %s
Richard Mitton21101b32013-09-19 23:21:01 +00002
3; First CU
4; CHECK: .long 44 # Length of ARange Set
5; CHECK-NEXT: .short 2 # DWARF Arange version number
6; CHECK-NEXT: .long .L.debug_info_begin0 # Offset Into Debug Info Section
7; CHECK-NEXT: .byte 8 # Address Size (in bytes)
8; CHECK-NEXT: .byte 0 # Segment Size (in bytes)
Benjamin Kramer8a68ab32014-01-07 19:28:14 +00009; CHECK-NEXT: .zero 4,255
Richard Mitton21101b32013-09-19 23:21:01 +000010; CHECK-NEXT: .quad kittens
Rafael Espindolac606bfe2014-10-21 01:17:30 +000011; CHECK-NEXT: .quad rainbows-kittens
Richard Mitton21101b32013-09-19 23:21:01 +000012; CHECK-NEXT: .quad 0 # ARange terminator
13; CHECK-NEXT: .quad 0
14
15; Second CU
16; CHECK-NEXT: .long 44 # Length of ARange Set
17; CHECK-NEXT: .short 2 # DWARF Arange version number
18; CHECK-NEXT: .long .L.debug_info_begin1 # Offset Into Debug Info Section
19; CHECK-NEXT: .byte 8 # Address Size (in bytes)
20; CHECK-NEXT: .byte 0 # Segment Size (in bytes)
Benjamin Kramer8a68ab32014-01-07 19:28:14 +000021; CHECK-NEXT: .zero 4,255
Richard Mitton21101b32013-09-19 23:21:01 +000022; CHECK-NEXT: .quad rainbows
Rafael Espindolac606bfe2014-10-21 01:17:30 +000023; CHECK-NEXT: .quad .Ldebug_end0-rainbows
Richard Mitton21101b32013-09-19 23:21:01 +000024; CHECK-NEXT: .quad 0 # ARange terminator
25; CHECK-NEXT: .quad 0
26
27
28; Generated from: clang -c -g -emit-llvm
29; llvm-link test1.bc test2.bc -o test.bc
30; test1.c: int kittens = 4;
31; test2.c: int rainbows = 5;
32
33
34
35
36; ModuleID = 'test.bc'
37target triple = "x86_64-unknown-linux-gnu"
38
39@kittens = global i32 4, align 4
40@rainbows = global i32 5, align 4
41
42!llvm.dbg.cu = !{!0, !7}
Manman Ren409558f2013-11-22 21:49:45 +000043!llvm.module.flags = !{!12, !13}
Richard Mitton21101b32013-09-19 23:21:01 +000044
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000045!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)
46!1 = !MDFile(filename: "test1.c", directory: "/home/kayamon")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000047!2 = !{}
48!3 = !{!4}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000049!4 = !MDGlobalVariable(name: "kittens", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6, variable: i32* @kittens)
50!5 = !MDFile(filename: "test1.c", directory: "/home/kayamon")
51!6 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
52!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)
53!8 = !MDFile(filename: "test2.c", directory: "/home/kayamon")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000054!9 = !{!10}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000055!10 = !MDGlobalVariable(name: "rainbows", line: 1, isLocal: false, isDefinition: true, scope: null, file: !11, type: !6, variable: i32* @rainbows)
56!11 = !MDFile(filename: "test2.c", directory: "/home/kayamon")
Duncan P. N. Exon Smithbe7ea192014-12-15 19:07:53 +000057!12 = !{i32 2, !"Dwarf Version", i32 4}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000058!13 = !{i32 1, !"Debug Info Version", i32 3}