diff options
| author | Georgii Rymar <grimar@accesssoftek.com> | 2019-11-08 15:21:24 +0300 |
|---|---|---|
| committer | Georgii Rymar <grimar@accesssoftek.com> | 2019-11-12 10:08:06 +0300 |
| commit | e80e9b975218c2bd6ca4de8b1035103e43442d7c (patch) | |
| tree | de0f415b833a982bb047e0fbd3ffc6e00692cc24 | |
| parent | dd101539dac5e464042c04b72090741317d48c23 (diff) | |
| download | bcm5719-llvm-e80e9b975218c2bd6ca4de8b1035103e43442d7c.tar.gz bcm5719-llvm-e80e9b975218c2bd6ca4de8b1035103e43442d7c.zip | |
[llvm-readelf/llvm-readobj][test] - Convert elf-linker-options.ll to use YAML.
This converts elf-linker-options.ll to use yaml2obj instead of llc,
improves and cleanups it a bit.
This opens a road to add an additional tests for checking the broken cases.
Differential revision: https://reviews.llvm.org/D70004
| -rw-r--r-- | llvm/test/tools/llvm-readobj/elf-linker-options.ll | 12 | ||||
| -rw-r--r-- | llvm/test/tools/llvm-readobj/elf-linker-options.test | 30 |
2 files changed, 30 insertions, 12 deletions
diff --git a/llvm/test/tools/llvm-readobj/elf-linker-options.ll b/llvm/test/tools/llvm-readobj/elf-linker-options.ll deleted file mode 100644 index 31d08cf0252..00000000000 --- a/llvm/test/tools/llvm-readobj/elf-linker-options.ll +++ /dev/null @@ -1,12 +0,0 @@ -; RUN: llc -mtriple x86_64-elf -filetype obj -o - %s | llvm-readobj --elf-linker-options - | FileCheck %s -; REQUIRES: x86-registered-target - -!llvm.linker.options = !{!0, !1} - -!0 = !{!"option 0", !"value 0"} -!1 = !{!"option 1", !"value 1"} - -; CHECK: LinkerOptions [ -; CHECK: option 0: value 0 -; CHECK: option 1: value 1 -; CHECK: ] diff --git a/llvm/test/tools/llvm-readobj/elf-linker-options.test b/llvm/test/tools/llvm-readobj/elf-linker-options.test new file mode 100644 index 00000000000..ca4884e2459 --- /dev/null +++ b/llvm/test/tools/llvm-readobj/elf-linker-options.test @@ -0,0 +1,30 @@ +## Check that we can use the --elf-linker-options option +## to dump SHT_LLVM_LINKER_OPTIONS sections. + +# RUN: yaml2obj %s -o %t1 +# RUN: llvm-readobj --elf-linker-options %t1 | FileCheck %s + +# CHECK: LinkerOptions [ +# CHECK-NEXT: option 0: value 0 +# CHECK-NEXT: option 1: value 1 +# CHECK-NEXT: ] + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .linker-options + Type: SHT_LLVM_LINKER_OPTIONS + Options: + - Name: option 0 + Value: value 0 + - Name: option 1 + Value: value 1 + +## llvm-readelf doesn't support --elf-linker-options yet. +# RUN: llvm-readelf --elf-linker-options %t1 2>&1 | FileCheck %s --check-prefix=READELF + +# READELF: printELFLinkerOptions not implemented! |

