From 9d2851e142a17af9b746ae6edcde12449ab73cbc Mon Sep 17 00:00:00 2001 From: Fazlay Rabbi Date: Tue, 17 Dec 2024 09:05:21 -0800 Subject: [PATCH] [OpenCL-clang] Port options after dd647e3e608 --- options.h | 10 +++++++++- options_compile.cpp | 11 ----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/options.h b/options.h index dd506cad..43e87f04 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 b529ec79..a484e96e 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;