Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port options after dd647e3e608 #558

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading