forked from OSchip/llvm-project
Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.
llvm-svn: 89371
This commit is contained in:
parent
1eab66c7cc
commit
8c9efca5bd
|
@ -17,8 +17,6 @@ namespace driver {
|
|||
namespace cc1options {
|
||||
enum ID {
|
||||
OPT_INVALID = 0, // This is not an option ID.
|
||||
OPT_INPUT, // Reserved ID for input option.
|
||||
OPT_UNKNOWN, // Reserved ID for unknown option.
|
||||
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
|
||||
HELPTEXT, METAVAR) OPT_##ID,
|
||||
#include "clang/Driver/CC1Options.inc"
|
||||
|
|
|
@ -24,6 +24,10 @@ class OptionKind<string name, int predecence = 0, bit sentinel = 0> {
|
|||
|
||||
// An option group.
|
||||
def KIND_GROUP : OptionKind<"Group">;
|
||||
// The input option kind.
|
||||
def KIND_INPUT : OptionKind<"Input", 1, 1>;
|
||||
// The unknown option kind.
|
||||
def KIND_UNKNOWN : OptionKind<"Unknown", 2, 1>;
|
||||
// A flag with no values.
|
||||
def KIND_FLAG : OptionKind<"Flag">;
|
||||
// An option which prefixes its (single) value.
|
||||
|
@ -116,3 +120,10 @@ class Flags<list<OptionFlag> flags> { list<OptionFlag> Flags = flags; }
|
|||
class Group<OptionGroup group> { OptionGroup Group = group; }
|
||||
class HelpText<string text> { string HelpText = text; }
|
||||
class MetaVarName<string name> { string MetaVarName = name; }
|
||||
|
||||
// Predefined options.
|
||||
|
||||
// FIXME: Have generator validate that these appear in correct position (and
|
||||
// aren't duplicated).
|
||||
def INPUT : Option<"<input>", KIND_INPUT>, Flags<[DriverOption]>;
|
||||
def UNKNOWN : Option<"<unknown>", KIND_UNKNOWN>;
|
||||
|
|
|
@ -17,8 +17,6 @@ namespace driver {
|
|||
namespace options {
|
||||
enum ID {
|
||||
OPT_INVALID = 0, // This is not an option ID.
|
||||
OPT_INPUT, // Reserved ID for input option.
|
||||
OPT_UNKNOWN, // Reserved ID for unknown option.
|
||||
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
|
||||
HELPTEXT, METAVAR) OPT_##ID,
|
||||
#include "clang/Driver/Options.inc"
|
||||
|
|
|
@ -16,11 +16,6 @@ using namespace clang::driver::options;
|
|||
using namespace clang::driver::cc1options;
|
||||
|
||||
static OptTable::Info CC1InfoTable[] = {
|
||||
// The InputOption info
|
||||
{ "<input>", 0, 0, Option::InputClass, DriverOption, 0, OPT_INVALID, OPT_INVALID },
|
||||
// The UnknownOption info
|
||||
{ "<unknown>", 0, 0, Option::UnknownClass, 0, 0, OPT_INVALID, OPT_INVALID },
|
||||
|
||||
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
|
||||
HELPTEXT, METAVAR) \
|
||||
{ NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM, \
|
||||
|
|
|
@ -15,11 +15,6 @@ using namespace clang::driver;
|
|||
using namespace clang::driver::options;
|
||||
|
||||
static OptTable::Info InfoTable[] = {
|
||||
// The InputOption info
|
||||
{ "<input>", 0, 0, Option::InputClass, DriverOption, 0, OPT_INVALID, OPT_INVALID },
|
||||
// The UnknownOption info
|
||||
{ "<unknown>", 0, 0, Option::UnknownClass, 0, 0, OPT_INVALID, OPT_INVALID },
|
||||
|
||||
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
|
||||
HELPTEXT, METAVAR) \
|
||||
{ NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM, \
|
||||
|
|
Loading…
Reference in New Issue