[PATCH] D79545: [VE] Implements minimum MC layer for VE (3/4)

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 18:34:44 PDT 2020


kaz7 updated this revision to Diff 263902.
kaz7 added a comment.
Herald added a subscriber: mgorny.

I add several unit tests.  I summarized modified files and tests for
each of them below.  Please check them and let me know what you think.
Thanks.

- llvm/include/llvm/BinaryFormat/ELF.h
  - Add unittest/Object/ELFTest.cpp, but the test becomes something like an apple is an apple test.  Maybe, it's Ok.
- llvm/include/llvm/BinaryFormat/ELFRelocs/VE.def
  - Add unittest/Object/ELFTest.cpp, but  the test again becomes an apple is an apple test.
- llvm/include/llvm/Object/ELFObjectFile.h
  - Add unittest/Object/ELFObjectFileTest.cpp.  This is a good example as a unit test.
  - Add test/Object/VE/elf64-arch.yaml and elf64-machine.yaml.  We can remove them if we have above unit test.
- llvm/lib/Object/ELF.cpp
  - Add unittest/Object/ELFTest.cpp.  The test is also an apple is an apple test, but it can examine getELFRelocationTypeName function, so not bad.
  - Add test/tools/llvm-readobj/ELF/reloc-types-elf-ve.test.  We can remove this if we have above unit test.
- llvm/lib/ObjectYAML/ELFYAML.cpp
  - No idea how to make a unit test.
  - Add test/tools/obj2yaml/ELF/relocation-type-ve.yaml.
- llvm/tools/llvm-readobj/ELFDumper.cpp
  - Making a unit test requires refactoring of ELFDumper.cpp.  It is out of my purpose.
  - Add test/tools/llvm-readobj/ELF/machine-enum.test.

If these modifications and tests are Ok, I'll remove following
duplicated tests.

- test/Object/VE/elf64-arch.yaml
- test/Object/VE/elf64-machine.yaml
- test/tools/llvm-readobj/ELF/reloc-types-elf-ve.test


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79545/new/

https://reviews.llvm.org/D79545

Files:
  llvm/include/llvm/BinaryFormat/ELF.h
  llvm/include/llvm/BinaryFormat/ELFRelocs/VE.def
  llvm/include/llvm/Object/ELFObjectFile.h
  llvm/lib/Object/ELF.cpp
  llvm/lib/ObjectYAML/ELFYAML.cpp
  llvm/test/Object/VE/elf64-arch.yaml
  llvm/test/Object/VE/elf64-machine.yaml
  llvm/test/Object/VE/lit.local.cfg
  llvm/test/tools/llvm-readobj/ELF/machine-enum.test
  llvm/test/tools/llvm-readobj/ELF/reloc-types-elf-ve.test
  llvm/test/tools/obj2yaml/ELF/relocation-type-ve.yaml
  llvm/tools/llvm-readobj/ELFDumper.cpp
  llvm/unittests/Object/CMakeLists.txt
  llvm/unittests/Object/ELFObjectFileTest.cpp
  llvm/unittests/Object/ELFTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79545.263902.patch
Type: text/x-patch
Size: 44041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200514/a42416bb/attachment.bin>


More information about the llvm-commits mailing list