1RUN: llvm-rtdyld -printline %p/Inputs/test-inline.o \
2RUN:   | FileCheck %s -check-prefix TEST_INLINE
3RUN: llvm-rtdyld -printdebugline %p/Inputs/test-inline.o \
4RUN:   | FileCheck %s -check-prefix TEST_INLINE
5RUN: llvm-rtdyld -printline %p/Inputs/test-parameters.o \
6RUN:   | FileCheck %s -check-prefix TEST_PARAMETERS
7RUN: llvm-rtdyld -printdebugline %p/Inputs/test-parameters.o \
8RUN:   | FileCheck %s -check-prefix TEST_PARAMETERS
9
10; This test verifies that relocations are correctly applied to the
11; .debug_line section and exercises DIContext::getLineInfoForAddressRange().
12; If relocations are not applied the first two functions will be reported as
13; both starting at address zero in the; line number table.
14TEST_INLINE:      Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
15TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:33
16TEST_INLINE-NEXT: Line info @ 35: test-inline.cpp, line:34
17TEST_INLINE-NEXT: Line info @ 165: test-inline.cpp, line:35
18TEST_INLINE-NEXT: Function: _Z3foov, Size = 3
19TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:28
20TEST_INLINE-NEXT: Line info @ 2: test-inline.cpp, line:29
21TEST_INLINE-NEXT: Function: main, Size = 146
22TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:39
23TEST_INLINE-NEXT: Line info @ 21: test-inline.cpp, line:41
24TEST_INLINE-NEXT: Line info @ 39: test-inline.cpp, line:42
25TEST_INLINE-NEXT: Line info @ 60: test-inline.cpp, line:44
26TEST_INLINE-NEXT: Line info @ 80: test-inline.cpp, line:48
27TEST_INLINE-NEXT: Line info @ 90: test-inline.cpp, line:45
28TEST_INLINE-NEXT: Line info @ 95: test-inline.cpp, line:46
29TEST_INLINE-NEXT: Line info @ 114: test-inline.cpp, line:48
30TEST_INLINE-NEXT: Line info @ 141: test-inline.cpp, line:49
31
32; This test checks the case where all code is in a single section.
33TEST_PARAMETERS:      Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
34TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:33
35TEST_PARAMETERS-NEXT: Line info @ 35: test-parameters.cpp, line:34
36TEST_PARAMETERS-NEXT: Line info @ 165: test-parameters.cpp, line:35
37TEST_PARAMETERS-NEXT: Function: _Z3foov, Size = 3
38TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:28
39TEST_PARAMETERS-NEXT: Line info @ 2: test-parameters.cpp, line:29
40TEST_PARAMETERS-NEXT: Function: main, Size = 146
41TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:39
42TEST_PARAMETERS-NEXT: Line info @ 21: test-parameters.cpp, line:41
43TEST_PARAMETERS-NEXT: Line info @ 39: test-parameters.cpp, line:42
44TEST_PARAMETERS-NEXT: Line info @ 60: test-parameters.cpp, line:44
45TEST_PARAMETERS-NEXT: Line info @ 80: test-parameters.cpp, line:48
46TEST_PARAMETERS-NEXT: Line info @ 90: test-parameters.cpp, line:45
47TEST_PARAMETERS-NEXT: Line info @ 95: test-parameters.cpp, line:46
48TEST_PARAMETERS-NEXT: Line info @ 114: test-parameters.cpp, line:48
49TEST_PARAMETERS-NEXT: Line info @ 141: test-parameters.cpp, line:49
50
51