diff --git a/options.h b/options.h index dd506ca..43e87f0 100644 --- a/options.h +++ b/options.h @@ -43,6 +43,14 @@ enum COMPILE_OPT_ID { #undef PREFIX }; +#define OPTTABLE_STR_TABLE_CODE +#include "opencl_clang_options.inc" +#undef OPTTABLE_STR_TABLE_CODE + +#define OPTTABLE_PREFIXES_TABLE_CODE +#include "opencl_clang_options.inc" +#undef OPTTABLE_PREFIXES_TABLE_CODE + typedef std::list ArgsVector; // @@ -99,7 +107,7 @@ class OpenCLArgList : public llvm::opt::ArgList { class OpenCLOptTable : public llvm::opt::GenericOptTable { public: OpenCLOptTable(llvm::ArrayRef pOptionInfos) - : llvm::opt::GenericOptTable(pOptionInfos) {} + : llvm::opt::GenericOptTable(OptionStrTable, OptionPrefixesTable, pOptionInfos) {} OpenCLArgList *ParseArgs(const char *szOptions, unsigned &missingArgIndex, unsigned &missingArgCount) const; diff --git a/options_compile.cpp b/options_compile.cpp index b529ec7..a484e96 100644 --- a/options_compile.cpp +++ b/options_compile.cpp @@ -31,17 +31,6 @@ Copyright (c) Intel Corporation (2009-2017). #include #include -#define PREFIX(NAME, VALUE) \ - static constexpr llvm::StringLiteral NAME##_init[] = VALUE; \ - static constexpr llvm::ArrayRef NAME( \ - NAME##_init, std::size(NAME##_init) - 1); -#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, \ - VISIBILITY, PARAM, HELPTEXT, HELPTEXTSFORVARIANTS, METAVAR, \ - VALUES) -#include "opencl_clang_options.inc" -#undef OPTION -#undef PREFIX - using namespace llvm::opt; extern llvm::ManagedStatic> compileMutex;