2010-12-31 17:31:54 +00:00
|
|
|
//===--- DriverOptions.cpp - Driver Options Table -------------------------===//
|
2009-11-19 00:15:11 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "clang/Driver/Options.h"
|
2013-07-15 03:38:40 +00:00
|
|
|
#include "llvm/ADT/STLExtras.h"
|
2013-06-14 17:17:23 +00:00
|
|
|
#include "llvm/Option/OptTable.h"
|
|
|
|
#include "llvm/Option/Option.h"
|
2009-11-19 00:15:11 +00:00
|
|
|
|
|
|
|
using namespace clang::driver;
|
|
|
|
using namespace clang::driver::options;
|
2013-06-14 17:17:23 +00:00
|
|
|
using namespace llvm::opt;
|
2009-11-19 00:15:11 +00:00
|
|
|
|
2013-07-17 16:54:06 +00:00
|
|
|
#define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE;
|
2012-10-22 22:13:48 +00:00
|
|
|
#include "clang/Driver/Options.inc"
|
|
|
|
#undef PREFIX
|
|
|
|
|
2009-12-10 00:07:02 +00:00
|
|
|
static const OptTable::Info InfoTable[] = {
|
2017-06-20 16:31:31 +00:00
|
|
|
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
|
|
|
|
HELPTEXT, METAVAR, VALUES) \
|
|
|
|
{PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, \
|
|
|
|
PARAM, FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS, VALUES},
|
2009-11-19 01:03:50 +00:00
|
|
|
#include "clang/Driver/Options.inc"
|
2013-07-17 16:54:06 +00:00
|
|
|
#undef OPTION
|
2009-11-19 00:15:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
class DriverOptTable : public OptTable {
|
|
|
|
public:
|
|
|
|
DriverOptTable()
|
2015-10-21 16:31:33 +00:00
|
|
|
: OptTable(InfoTable) {}
|
2009-11-19 00:15:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-01-13 17:34:15 +00:00
|
|
|
std::unique_ptr<OptTable> clang::driver::createDriverOptTable() {
|
2017-08-23 14:48:58 +00:00
|
|
|
return llvm::make_unique<DriverOptTable>();
|
2009-11-19 00:15:11 +00:00
|
|
|
}
|