aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Driver/Options.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-19 09:00:00 +0000
commitf5bd02d290ff15268853e0456c130a1afa15e907 (patch)
treec7f5a7b6fd212399d821b83b22c1e6a42e8c4a0d /include/clang/Driver/Options.h
parentb3d5a323a5ca92ea73443499cee2f15db1ff0fb3 (diff)
downloadsrc-f5bd02d290ff15268853e0456c130a1afa15e907.tar.gz
src-f5bd02d290ff15268853e0456c130a1afa15e907.zip
Update clang to r89337.
Notes
Notes: svn path=/vendor/clang/dist/; revision=199512
Diffstat (limited to 'include/clang/Driver/Options.h')
-rw-r--r--include/clang/Driver/Options.h68
1 files changed, 6 insertions, 62 deletions
diff --git a/include/clang/Driver/Options.h b/include/clang/Driver/Options.h
index 7fcaf3f497be..b05d5afd7578 100644
--- a/include/clang/Driver/Options.h
+++ b/include/clang/Driver/Options.h
@@ -7,11 +7,13 @@
//
//===----------------------------------------------------------------------===//
-#ifndef CLANG_DRIVER_OPTIONS_H_
-#define CLANG_DRIVER_OPTIONS_H_
+#ifndef CLANG_DRIVER_OPTIONS_H
+#define CLANG_DRIVER_OPTIONS_H
namespace clang {
namespace driver {
+ class OptTable;
+
namespace options {
enum ID {
OPT_INVALID = 0, // This is not an option ID.
@@ -19,71 +21,13 @@ namespace options {
OPT_UNKNOWN, // Reserved ID for unknown option.
#define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM, \
HELPTEXT, METAVAR) OPT_##ID,
-#include "clang/Driver/Options.def"
+#include "clang/Driver/Options.inc"
LastOption
#undef OPTION
};
}
- class Arg;
- class InputArgList;
- class Option;
-
- /// OptTable - Provide access to the Option info table.
- ///
- /// The OptTable class provides a layer of indirection which allows
- /// Option instance to be created lazily. In the common case, only a
- /// few options will be needed at runtime; the OptTable class
- /// maintains enough information to parse command lines without
- /// instantiating Options, while letting other parts of the driver
- /// still use Option instances where convient.
- class OptTable {
- /// The table of options which have been constructed, indexed by
- /// option::ID - 1.
- mutable Option **Options;
-
- /// The index of the first option which can be parsed (i.e., is
- /// not a special option like 'input' or 'unknown', and is not an
- /// option group).
- unsigned FirstSearchableOption;
-
- Option *constructOption(options::ID id) const;
-
- public:
- OptTable();
- ~OptTable();
-
- unsigned getNumOptions() const;
-
- const char *getOptionName(options::ID id) const;
-
- /// getOption - Get the given \arg id's Option instance, lazily
- /// creating it if necessary.
- const Option *getOption(options::ID id) const;
-
- /// getOptionKind - Get the kind of the given option.
- unsigned getOptionKind(options::ID id) const;
-
- /// getOptionHelpText - Get the help text to use to describe this
- /// option.
- const char *getOptionHelpText(options::ID id) const;
-
- /// getOptionMetaVar - Get the meta-variable name to use when
- /// describing this options values in the help text.
- const char *getOptionMetaVar(options::ID id) const;
-
- /// parseOneArg - Parse a single argument; returning the new
- /// argument and updating Index.
- ///
- /// \param [in] [out] Index - The current parsing position in the
- /// argument string list; on return this will be the index of the
- /// next argument string to parse.
- ///
- /// \return - The parsed argument, or 0 if the argument is missing
- /// values (in which case Index still points at the conceptual
- /// next argument string to parse).
- Arg *ParseOneArg(const InputArgList &Args, unsigned &Index) const;
- };
+ OptTable *createDriverOptTable();
}
}