Generate staging `MachineValueType.h` (partially) from `ValueTypes.td`
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sun, 26 Mar 2023 10:53:05 +0000 (19:53 +0900)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Thu, 13 Apr 2023 23:41:44 +0000 (08:41 +0900)
commitfcc5f9ef50e18137fd8020127db05a59c3a4015d
tree33bb8a6fa9ec702298b039378bf9363b43575a65
parent8eb0ef288a0d95eb667e30b535869d5a880701d5
Generate staging `MachineValueType.h` (partially) from `ValueTypes.td`

- Implement `VTEmitter` as `llvm-tblgen -gen-vt`.
- Create a copy of `llvm/Support/MachineValueType.h` into `unittests/Support`.
  It includes `GenVT.inc` generated by `VTEmitter`.
- Implement `MVTTest` in `SupportTests`. It checks equivalence between
  `llvm/Support/MachineValueType.h` and the generated header.

Differential Revision: https://reviews.llvm.org/D146906
llvm/unittests/Support/CMakeLists.txt
llvm/unittests/Support/MVTTest.cpp [new file with mode: 0644]
llvm/unittests/Support/MachineValueType.h
llvm/utils/TableGen/CMakeLists.txt
llvm/utils/TableGen/VTEmitter.cpp [new file with mode: 0644]
utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel