diff options
author | Jan Svoboda <jan_svoboda@apple.com> | 2023-08-04 11:19:09 -0700 |
---|---|---|
committer | Jan Svoboda <jan_svoboda@apple.com> | 2023-08-04 13:57:13 -0700 |
commit | 3f092f37b7362447cbb13f5502dae4bdd5762afd (patch) | |
tree | 9dc8c612f223fddbb3b4e029e86ae7a2a1cbd1f0 /lld/wasm | |
parent | e6b2e1b88248c1f5b34fde4e51aaeb99f849b580 (diff) | |
download | llvm-3f092f37b7362447cbb13f5502dae4bdd5762afd.zip llvm-3f092f37b7362447cbb13f5502dae4bdd5762afd.tar.gz llvm-3f092f37b7362447cbb13f5502dae4bdd5762afd.tar.bz2 |
[llvm] Extract common `OptTable` bits into macros
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.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D157028
Diffstat (limited to 'lld/wasm')
-rw-r--r-- | lld/wasm/Driver.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp index 8e2c937..b0d6d11 100644 --- a/lld/wasm/Driver.cpp +++ b/lld/wasm/Driver.cpp @@ -50,7 +50,7 @@ namespace { // Create enum with OPT_xxx values for each option in Options.td enum { OPT_INVALID = 0, -#define OPTION(_1, _2, ID, _4, _5, _6, _7, _8, _9, _10, _11, _12) OPT_##ID, +#define OPTION(...) LLVM_MAKE_OPT_ID(__VA_ARGS__), #include "Options.inc" #undef OPTION }; |