aboutsummaryrefslogtreecommitdiff
path: root/lld/MinGW
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2023-08-04 11:19:09 -0700
committerJan Svoboda <jan_svoboda@apple.com>2023-08-04 13:57:13 -0700
commit3f092f37b7362447cbb13f5502dae4bdd5762afd (patch)
tree9dc8c612f223fddbb3b4e029e86ae7a2a1cbd1f0 /lld/MinGW
parente6b2e1b88248c1f5b34fde4e51aaeb99f849b580 (diff)
downloadllvm-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/MinGW')
-rw-r--r--lld/MinGW/Driver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/MinGW/Driver.cpp b/lld/MinGW/Driver.cpp
index a5b83d2..67c4505 100644
--- a/lld/MinGW/Driver.cpp
+++ b/lld/MinGW/Driver.cpp
@@ -56,7 +56,7 @@ using namespace llvm;
// Create OptTable
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
};