[clang] [lld] [lldb] [llvm] [Option] Emit the Info table from TableGen. NFC (PR #224508)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 18 10:59:51 PDT 2026
================
@@ -57,27 +57,14 @@ enum ID {
};
namespace rc_opt {
-#define OPTTABLE_STR_TABLE_CODE
+#define OPTTABLE_CODE
#include "Opts.inc"
-#undef OPTTABLE_STR_TABLE_CODE
-
-#define OPTTABLE_PREFIXES_TABLE_CODE
-#include "Opts.inc"
-#undef OPTTABLE_PREFIXES_TABLE_CODE
-
-static constexpr opt::OptTable::Info InfoTable[] = {
-#define OPTION(...) LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),
-#include "Opts.inc"
-#undef OPTION
-};
+#undef OPTTABLE_CODE
----------------
MaskRay wrote:
Good idead!
Updating the emitter to write `#undef OPTTABLE_CODE, #undef OPTTABLE_STR_TABLE_CODE, and #undef OPTTABLE_VALUES_CODE` at the end of their blocks, and all 49 consumers lose the matching #undef lines
https://github.com/llvm/llvm-project/pull/224508
More information about the cfe-commits
mailing list