aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/OptTable.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-19 04:14:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-19 04:14:53 +0000
commit9e1f98260a1842df4bb8e6de0b592a1622dcfdc0 (patch)
treeff82af2b955e6408fa941e4e4aa47ca133438f2c /lib/Driver/OptTable.cpp
parent85615df8ccb51bc5a22cb941b06e5f36ad42eabe (diff)
Driver: Introduce OptSpecifier class for protecting access to an option id.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/OptTable.cpp')
-rw-r--r--lib/Driver/OptTable.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index 74937a7188..fae7f75f37 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -71,6 +71,10 @@ static inline bool operator<(const char *Name, const OptTable::Info &I) {
//
+OptSpecifier::OptSpecifier(const Option *Opt) : ID(Opt->getID()) {}
+
+//
+
OptTable::OptTable(const Info *_OptionInfos, unsigned _NumOptionInfos)
: OptionInfos(_OptionInfos), NumOptionInfos(_NumOptionInfos),
Options(new Option*[NumOptionInfos]),