All command-line tools using llvm::opt create an enum of option IDs and a table of OptTable::Info object. Most of the tools use the same ID (OPT_##ID), kind (Option::KIND##Class), group ID (OPT_##GROUP) and alias ID (OPT_##ALIAS). This patch extracts that common code into canonical macros. This results in fewer changes when tweaking the OPTION macros emitted by the TableGen backend.
Details
Details
- Reviewers
MaskRay JDevlieghere jhenderson alexander-shaposhnikov - Group Reviewers
Restricted Project - Commits
- rG3f092f37b736: [llvm] Extract common `OptTable` bits into macros
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'll be away for a few days but I took a quick glance. This change looks reasonable. Thanks!
Comment Actions
The #define OPTION(...) LLVM_MAKE_OPT_ID_WITH_ID_PREFIX(COFF_OPT_, __VA_ARGS__), use case looks good:)
lld/ELF/Driver.h | ||
---|---|---|
28 | lld/wasm lld/COFF lld/MachO are not updated? |
lld/ELF/Driver.h | ||
---|---|---|
28 | You're right, I accidentally missed some LLD parts. Updated. |
lld/wasm lld/COFF lld/MachO are not updated?