Skip to content

Commit

Permalink
[OpenCL-clang] Port options after dd647e3e608 (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdfazlay authored Dec 17, 2024
1 parent 53d58dd commit 60df7bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
10 changes: 9 additions & 1 deletion options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> ArgsVector;

//
Expand Down Expand Up @@ -99,7 +107,7 @@ class OpenCLArgList : public llvm::opt::ArgList {
class OpenCLOptTable : public llvm::opt::GenericOptTable {
public:
OpenCLOptTable(llvm::ArrayRef<Info> pOptionInfos)
: llvm::opt::GenericOptTable(pOptionInfos) {}
: llvm::opt::GenericOptTable(OptionStrTable, OptionPrefixesTable, pOptionInfos) {}

OpenCLArgList *ParseArgs(const char *szOptions, unsigned &missingArgIndex,
unsigned &missingArgCount) const;
Expand Down
11 changes: 0 additions & 11 deletions options_compile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ Copyright (c) Intel Corporation (2009-2017).
#include <map>
#include <sstream>

#define PREFIX(NAME, VALUE) \
static constexpr llvm::StringLiteral NAME##_init[] = VALUE; \
static constexpr llvm::ArrayRef<llvm::StringLiteral> 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<llvm::sys::SmartMutex<true>> compileMutex;
Expand Down

0 comments on commit 60df7bc

Please sign in to comment.