From b23e9d77e8b060552357f205bd874e388eebeb4f Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 6 Oct 2014 06:52:52 +0000 Subject: [PATCH] Add some tests for RelocVisitor. Patch by Charlie Turner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219107 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/DebugInfo/AArch64/processes-relocations.ll | 15 +++++++++++++++ test/DebugInfo/ARM/processes-relocations.ll | 15 +++++++++++++++ test/DebugInfo/Mips/processes-relocations.ll | 17 +++++++++++++++++ test/DebugInfo/PowerPC/processes-relocations.ll | 17 +++++++++++++++++ test/DebugInfo/Sparc/processes-relocations.ll | 17 +++++++++++++++++ test/DebugInfo/SystemZ/processes-relocations.ll | 15 +++++++++++++++ test/DebugInfo/X86/processes-relocations.ll | 17 +++++++++++++++++ 7 files changed, 113 insertions(+) create mode 100644 test/DebugInfo/AArch64/processes-relocations.ll create mode 100644 test/DebugInfo/ARM/processes-relocations.ll create mode 100644 test/DebugInfo/Mips/processes-relocations.ll create mode 100644 test/DebugInfo/PowerPC/processes-relocations.ll create mode 100644 test/DebugInfo/Sparc/processes-relocations.ll create mode 100644 test/DebugInfo/SystemZ/processes-relocations.ll create mode 100644 test/DebugInfo/X86/processes-relocations.ll diff --git a/test/DebugInfo/AArch64/processes-relocations.ll b/test/DebugInfo/AArch64/processes-relocations.ll new file mode 100644 index 00000000000..5ce9262ed55 --- /dev/null +++ b/test/DebugInfo/AArch64/processes-relocations.ll @@ -0,0 +1,15 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple aarch64-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} diff --git a/test/DebugInfo/ARM/processes-relocations.ll b/test/DebugInfo/ARM/processes-relocations.ll new file mode 100644 index 00000000000..8edd9547219 --- /dev/null +++ b/test/DebugInfo/ARM/processes-relocations.ll @@ -0,0 +1,15 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple arm-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} diff --git a/test/DebugInfo/Mips/processes-relocations.ll b/test/DebugInfo/Mips/processes-relocations.ll new file mode 100644 index 00000000000..98eba683bc3 --- /dev/null +++ b/test/DebugInfo/Mips/processes-relocations.ll @@ -0,0 +1,17 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple mips-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s +; RUN: llc -filetype=obj -O0 < %s -mtriple mips64-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} diff --git a/test/DebugInfo/PowerPC/processes-relocations.ll b/test/DebugInfo/PowerPC/processes-relocations.ll new file mode 100644 index 00000000000..5e661f72731 --- /dev/null +++ b/test/DebugInfo/PowerPC/processes-relocations.ll @@ -0,0 +1,17 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple powerpc64-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s +; RUN: llc -filetype=obj -O0 < %s -mtriple powerpc-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} diff --git a/test/DebugInfo/Sparc/processes-relocations.ll b/test/DebugInfo/Sparc/processes-relocations.ll new file mode 100644 index 00000000000..89cab9ec892 --- /dev/null +++ b/test/DebugInfo/Sparc/processes-relocations.ll @@ -0,0 +1,17 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple sparc-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s +; RUN: llc -filetype=obj -O0 < %s -mtriple sparcv9-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} diff --git a/test/DebugInfo/SystemZ/processes-relocations.ll b/test/DebugInfo/SystemZ/processes-relocations.ll new file mode 100644 index 00000000000..6f276f9ca95 --- /dev/null +++ b/test/DebugInfo/SystemZ/processes-relocations.ll @@ -0,0 +1,15 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple s390x-unknown-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} diff --git a/test/DebugInfo/X86/processes-relocations.ll b/test/DebugInfo/X86/processes-relocations.ll new file mode 100644 index 00000000000..f9a31ebd6bf --- /dev/null +++ b/test/DebugInfo/X86/processes-relocations.ll @@ -0,0 +1,17 @@ +; RUN: llc -filetype=obj -O0 < %s -mtriple x86_64-none-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s +; RUN: llc -filetype=obj -O0 < %s -mtriple i386-none-linux | \ +; RUN: llvm-dwarfdump - 2>&1 | FileCheck %s + +; CHECK-NOT: failed to compute relocation + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!3, !4} +!llvm.ident = !{!5} + +!0 = metadata !{i32 786449, metadata !1, i32 12, metadata !"clang version 3.6.0 ", i1 false, metadata !"", i32 0, metadata !2, metadata !2, metadata !2, metadata !2, metadata !2, metadata !"", i32 1} ; [ DW_TAG_compile_unit ] [/a/empty.c] [DW_LANG_C99] +!1 = metadata !{metadata !"empty.c", metadata !"/a"} +!2 = metadata !{} +!3 = metadata !{i32 2, metadata !"Dwarf Version", i32 4} +!4 = metadata !{i32 2, metadata !"Debug Info Version", i32 1} +!5 = metadata !{metadata !"clang version 3.6.0 "} -- 2.34.1