summaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-readtapi/llvm-readtapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-readtapi/llvm-readtapi.cpp')
-rw-r--r--llvm/tools/llvm-readtapi/llvm-readtapi.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/tools/llvm-readtapi/llvm-readtapi.cpp b/llvm/tools/llvm-readtapi/llvm-readtapi.cpp
index 04282d3e4877..b5574ea41e33 100644
--- a/llvm/tools/llvm-readtapi/llvm-readtapi.cpp
+++ b/llvm/tools/llvm-readtapi/llvm-readtapi.cpp
@@ -45,12 +45,13 @@ enum ID {
#undef OPTION
};
-#define PREFIX(NAME, VALUE) \
- static constexpr StringLiteral NAME##_init[] = VALUE; \
- static constexpr ArrayRef<StringLiteral> NAME(NAME##_init, \
- std::size(NAME##_init) - 1);
+#define OPTTABLE_STR_TABLE_CODE
#include "TapiOpts.inc"
-#undef PREFIX
+#undef OPTTABLE_STR_TABLE_CODE
+
+#define OPTTABLE_PREFIXES_TABLE_CODE
+#include "TapiOpts.inc"
+#undef OPTTABLE_PREFIXES_TABLE_CODE
static constexpr opt::OptTable::Info InfoTable[] = {
#define OPTION(...) LLVM_CONSTRUCT_OPT_INFO(__VA_ARGS__),
@@ -60,7 +61,8 @@ static constexpr opt::OptTable::Info InfoTable[] = {
class TAPIOptTable : public opt::GenericOptTable {
public:
- TAPIOptTable() : opt::GenericOptTable(InfoTable) {
+ TAPIOptTable()
+ : opt::GenericOptTable(OptionStrTable, OptionPrefixesTable, InfoTable) {
setGroupedShortOptions(true);
}
};