diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-10-18 20:33:42 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2012-10-18 20:33:42 +0000 |
commit | 97b8fd941475ec233b329a21a4ec94698f8a4b5b (patch) | |
tree | e14bf1c850d25d1675b1ebc7c28046b120f9b65e /include/clang/Driver/OptTable.h | |
parent | c337d1457e4600107a1b3793f62ca96a33f1308b (diff) |
[Options] make Option a value type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Driver/OptTable.h')
-rw-r--r-- | include/clang/Driver/OptTable.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/include/clang/Driver/OptTable.h b/include/clang/Driver/OptTable.h index ea7e57b12b..678d967659 100644 --- a/include/clang/Driver/OptTable.h +++ b/include/clang/Driver/OptTable.h @@ -47,15 +47,6 @@ namespace driver { const Info *OptionInfos; unsigned NumOptionInfos; - /// \brief The lazily constructed options table, indexed by option::ID - 1. - mutable Option **Options; - - /// \brief Prebound input option instance. - const Option *TheInputOption; - - /// \brief Prebound unknown option instance. - const Option *TheUnknownOption; - /// 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 FirstSearchableIndex; @@ -67,8 +58,6 @@ namespace driver { return OptionInfos[id - 1]; } - Option *CreateOption(unsigned id) const; - protected: OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos); public: @@ -81,17 +70,7 @@ namespace driver { /// if necessary. /// /// \return The option, or null for the INVALID option id. - const Option *getOption(OptSpecifier Opt) const { - unsigned id = Opt.getID(); - if (id == 0) - return 0; - - assert((unsigned) (id - 1) < getNumOptions() && "Invalid ID."); - Option *&Entry = Options[id - 1]; - if (!Entry) - Entry = CreateOption(id); - return Entry; - } + const Option getOption(OptSpecifier Opt) const; /// \brief Lookup the name of the given option. const char *getOptionName(OptSpecifier id) const { |