1; REQUIRES: x86_64-linux
2; Checks if symbolizer can correctly symbolize address in the padding between
3; functions.
4; RUN: llc  -o %t.o -filetype=obj -mtriple=x86_64-pc-linux  %s
5; RUN: llvm-symbolizer 0x5 -obj=%t.o | FileCheck %s --check-prefix=FOO
6; RUN: llvm-symbolizer 0xd -obj=%t.o | FileCheck %s --check-prefix=PADDING
7; RUN: llvm-symbolizer 0x10 -obj=%t.o | FileCheck %s --check-prefix=MAIN
8
9;FOO: foo
10;PADDING: ??
11;MAIN: main
12
13@a = global i32 1, align 4
14
15define i32 @foo() !dbg !9 {
16entry:
17  %0 = load i32, i32* @a, align 4
18  ret i32 %0
19}
20
21define i32 @main() !dbg !14 {
22entry:
23  %call = call i32 @foo(), !dbg !18
24  ret i32 %call
25}
26
27!llvm.dbg.cu = !{!0}
28!llvm.module.flags = !{!6, !7}
29
30!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
31!1 = !DIFile(filename: "padding-x86_64.c", directory: "/tmp/")
32!2 = !{}
33!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
34!6 = !{i32 2, !"Dwarf Version", i32 4}
35!7 = !{i32 2, !"Debug Info Version", i32 3}
36!9 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2)
37!10 = !DISubroutineType(types: !11)
38!11 = !{!5}
39!14 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !10, isLocal: false, isDefinition: true, scopeLine: 6, isOptimized: false, unit: !0, retainedNodes: !2)
40!18 = !DILocation(line: 7, column: 8, scope: !14)
41