diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-04 23:03:35 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-04 23:03:35 +0000 |
commit | 5cc8c639cf62cd154cce4ac036a0f19ae2855056 (patch) | |
tree | e3a2e48fae227a4b34dd8511e016467ef49fcc06 /lib/Driver/OptTable.cpp | |
parent | f781c4192ee51a55c08ec53f054284ad1cdb2043 (diff) |
Driver: Fix off by one in ParseOneArg; this code is ugly but will be
replaced anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/OptTable.cpp')
-rw-r--r-- | lib/Driver/OptTable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp index 284e3ba1e2..5de71d7633 100644 --- a/lib/Driver/OptTable.cpp +++ b/lib/Driver/OptTable.cpp @@ -127,11 +127,11 @@ Arg *OptTable::ParseOneArg(const ArgList &Args, unsigned &Index, return new PositionalArg(getOption(InputOpt), Index++); for (unsigned j = UnknownOpt + 1; j < getNumOptions(); ++j) { - const char *OptName = getOptionName((options::ID) (j + 1)); + const char *OptName = getOptionName((options::ID) j); // Arguments are only accepted by options which prefix them. if (memcmp(Str, OptName, strlen(OptName)) == 0) - if (Arg *A = getOption((options::ID) (j + 1))->accept(Args, Index)) + if (Arg *A = getOption((options::ID) j)->accept(Args, Index)) return A; } |