2011-01-01 01:31:54 +08:00
|
|
|
//===--- DriverOptions.cpp - Driver Options Table -------------------------===//
|
2009-11-19 08:15:11 +08: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 11:38:40 +08:00
|
|
|
#include "llvm/ADT/STLExtras.h"
|
2013-06-15 01:17:23 +08:00
|
|
|
#include "llvm/Option/OptTable.h"
|
|
|
|
#include "llvm/Option/Option.h"
|
2009-11-19 08:15:11 +08:00
|
|
|
|
|
|
|
using namespace clang::driver;
|
|
|
|
using namespace clang::driver::options;
|
2013-06-15 01:17:23 +08:00
|
|
|
using namespace llvm::opt;
|
2009-11-19 08:15:11 +08:00
|
|
|
|
2013-07-18 00:54:06 +08:00
|
|
|
#define PREFIX(NAME, VALUE) static const char *const NAME[] = VALUE;
|
2012-10-23 06:13:48 +08:00
|
|
|
#include "clang/Driver/Options.inc"
|
|
|
|
#undef PREFIX
|
|
|
|
|
2009-12-10 08:07:02 +08:00
|
|
|
static const OptTable::Info InfoTable[] = {
|
2013-08-01 07:07:21 +08:00
|
|
|
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
|
2009-11-19 08:15:11 +08:00
|
|
|
HELPTEXT, METAVAR) \
|
2012-10-23 06:13:48 +08:00
|
|
|
{ PREFIX, NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, PARAM, \
|
2013-08-01 07:07:21 +08:00
|
|
|
FLAGS, OPT_##GROUP, OPT_##ALIAS, ALIASARGS },
|
2009-11-19 09:03:50 +08:00
|
|
|
#include "clang/Driver/Options.inc"
|
2013-07-18 00:54:06 +08:00
|
|
|
#undef OPTION
|
2009-11-19 08:15:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
class DriverOptTable : public OptTable {
|
|
|
|
public:
|
|
|
|
DriverOptTable()
|
2015-10-22 00:31:33 +08:00
|
|
|
: OptTable(InfoTable) {}
|
2009-11-19 08:15:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
OptTable *clang::driver::createDriverOptTable() {
|
|
|
|
return new DriverOptTable();
|
|
|
|
}
|