summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/debuglineinfo-macho.test43
-rw-r--r--llvm/test/DebugInfo/debuglineinfo.test3
2 files changed, 37 insertions, 9 deletions
diff --git a/llvm/test/DebugInfo/debuglineinfo-macho.test b/llvm/test/DebugInfo/debuglineinfo-macho.test
index ac292d997ff..0c63dd6e8b0 100644
--- a/llvm/test/DebugInfo/debuglineinfo-macho.test
+++ b/llvm/test/DebugInfo/debuglineinfo-macho.test
@@ -1,12 +1,43 @@
# Check that relocations get applied
RUN: llvm-dwarfdump %p/Inputs/test-simple-macho.o | FileCheck %s
RUN: llvm-dwarfdump %p/Inputs/test-multiple-macho.o | FileCheck %s
-RUN: llvm-rtdyld -printline %p/Inputs/test-multiple-macho.o | \
-RUN: FileCheck --check-prefix=SIZE %s
+RUN: llvm-rtdyld -printline %p/Inputs/test-multiple-macho.o | FileCheck %s
RUN: llvm-rtdyld -printobjline %p/Inputs/test-multiple-macho.o | FileCheck %s
-SIZE: Function: _bar, Size = 48
-SIZE: Function: _foo, Size = 16
-SIZE: Function: _fubar, Size = 46
-
CHECK-NOT: error: failed to compute relocation: X86_64_RELOC_UNSIGNED
+
+# Check that relocations get applied correctly
+RUN: llvm-rtdyld -printobjline %p/Inputs/test-simple-macho.o \
+RUN: | FileCheck %s -check-prefix TEST_SIMPLE
+RUN: llvm-rtdyld -printline %p/Inputs/test-simple-macho.o \
+RUN: | FileCheck %s -check-prefix TEST_SIMPLE
+RUN: llvm-rtdyld -printobjline %p/Inputs/test-multiple-macho.o \
+RUN: | FileCheck %s -check-prefix TEST_MULTIPLE
+RUN: llvm-rtdyld -printline %p/Inputs/test-multiple-macho.o \
+RUN: | FileCheck %s -check-prefix TEST_MULTIPLE
+
+TEST_SIMPLE: Function: _foo, Size = 11
+TEST_SIMPLE-NEXT: Line info @ 0: simple.c, line:1
+TEST_SIMPLE-NEXT: Line info @ 7: simple.c, line:2
+TEST_SIMPLE-NOT: Line info @ 11: simple.c, line:2
+
+TEST_MULTIPLE: Function: _bar, Size = 48
+TEST_MULTIPLE-NEXT: Line info @ 0: multiple.c, line:5
+TEST_MULTIPLE-NEXT: Line info @ 7: multiple.c, line:6
+TEST_MULTIPLE-NEXT: Line info @ 16: multiple.c, line:9
+TEST_MULTIPLE-NEXT: Line info @ 21: multiple.c, line:9
+TEST_MULTIPLE-NEXT: Line info @ 26: multiple.c, line:7
+TEST_MULTIPLE-NEXT: Line info @ 33: multiple.c, line:10
+TEST_MULTIPLE-NOT: Line info @ 48: multiple.c, line:12
+TEST_MULTIPLE-NEXT: Function: _foo, Size = 16
+TEST_MULTIPLE-NEXT: Line info @ 0: multiple.c, line:1
+TEST_MULTIPLE-NEXT: Line info @ 7: multiple.c, line:2
+TEST_MULTIPLE-NOT: Line info @ 16: multiple.c, line:5
+TEST_MULTIPLE-NEXT: Function: _fubar, Size = 46
+TEST_MULTIPLE-NEXT: Line info @ 0: multiple.c, line:12
+TEST_MULTIPLE-NEXT: Line info @ 7: multiple.c, line:13
+TEST_MULTIPLE-NEXT: Line info @ 12: multiple.c, line:17
+TEST_MULTIPLE-NEXT: Line info @ 25: multiple.c, line:15
+TEST_MULTIPLE-NEXT: Line info @ 34: multiple.c, line:19
+TEST_MULTIPLE-NEXT: Line info @ 41: multiple.c, line:21
+TEST_MULTIPLE-NOT: Line info @ 46: multiple.c, line:21
diff --git a/llvm/test/DebugInfo/debuglineinfo.test b/llvm/test/DebugInfo/debuglineinfo.test
index 96a32285be4..720ba12ed76 100644
--- a/llvm/test/DebugInfo/debuglineinfo.test
+++ b/llvm/test/DebugInfo/debuglineinfo.test
@@ -18,7 +18,6 @@ TEST_INLINE-NEXT: Line info @ 165: test-inline.cpp, line:35
TEST_INLINE-NEXT: Function: _Z3foov, Size = 3
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:28
TEST_INLINE-NEXT: Line info @ 2: test-inline.cpp, line:29
-TEST_INLINE-NEXT: Line info @ 3: test-inline.cpp, line:29
TEST_INLINE-NEXT: Function: main, Size = 146
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:39
TEST_INLINE-NEXT: Line info @ 21: test-inline.cpp, line:41
@@ -29,7 +28,6 @@ TEST_INLINE-NEXT: Line info @ 90: test-inline.cpp, line:45
TEST_INLINE-NEXT: Line info @ 95: test-inline.cpp, line:46
TEST_INLINE-NEXT: Line info @ 114: test-inline.cpp, line:48
TEST_INLINE-NEXT: Line info @ 141: test-inline.cpp, line:49
-TEST_INLINE-NEXT: Line info @ 146: test-inline.cpp, line:49
; This test checks the case where all code is in a single section.
TEST_PARAMETERS: Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170
@@ -49,5 +47,4 @@ TEST_PARAMETERS-NEXT: Line info @ 90: test-parameters.cpp, line:45
TEST_PARAMETERS-NEXT: Line info @ 95: test-parameters.cpp, line:46
TEST_PARAMETERS-NEXT: Line info @ 114: test-parameters.cpp, line:48
TEST_PARAMETERS-NEXT: Line info @ 141: test-parameters.cpp, line:49
-TEST_PARAMETERS-NEXT: Line info @ 146: test-parameters.cpp, line:49
OpenPOWER on IntegriCloud