aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/OptTable.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2012-10-03 19:58:10 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2012-10-03 19:58:10 +0000
commit9b7dcdb53cee4234c48bb4ceeef39536419945cf (patch)
treeeb370024d6258b6bc5ee015b129e8762b808986f /lib/Driver/OptTable.cpp
parentfc44e88cbdf013d285f2e4e3962fb80dcad56770 (diff)
[Options] Store the owning OptTable in Option so it can construct Group and Alias.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/OptTable.cpp')
-rw-r--r--lib/Driver/OptTable.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index a6d3cb3149..680ea9938f 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -134,13 +134,7 @@ bool OptTable::isOptionHelpHidden(OptSpecifier id) const {
}
Option *OptTable::CreateOption(unsigned id) const {
- const Info &info = getInfo(id);
- const Option *Group = getOption(info.GroupID);
- const Option *Alias = getOption(info.AliasID);
-
- Option *Opt = new Option(&info, Group, Alias);
-
- return Opt;
+ return new Option(&getInfo(id), this);
}
Arg *OptTable::ParseOneArg(const ArgList &Args, unsigned &Index) const {