diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-06-21 06:31:53 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-06-21 06:31:53 +0000 |
commit | 006bce77640690b2b4b539ec47eec2deaf190d1e (patch) | |
tree | 14c0ff6e4388cf69c2589e92049f51ebb161df22 /lib/Option | |
parent | 87ae2e8ab0b62cde1169aae3dde30dad43095ac7 (diff) |
ArrayRef-ify ParseArgs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240233 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Option')
-rw-r--r-- | lib/Option/OptTable.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Option/OptTable.cpp b/lib/Option/OptTable.cpp index c37f193fa64..cec1717454f 100644 --- a/lib/Option/OptTable.cpp +++ b/lib/Option/OptTable.cpp @@ -247,18 +247,17 @@ Arg *OptTable::ParseOneArg(const ArgList &Args, unsigned &Index, return new Arg(getOption(TheUnknownOptionID), Str, Index++, Str); } -InputArgList *OptTable::ParseArgs(const char *const *ArgBegin, - const char *const *ArgEnd, +InputArgList *OptTable::ParseArgs(ArrayRef<const char *> ArgArr, unsigned &MissingArgIndex, unsigned &MissingArgCount, unsigned FlagsToInclude, unsigned FlagsToExclude) const { - InputArgList *Args = new InputArgList(ArgBegin, ArgEnd); + InputArgList *Args = new InputArgList(ArgArr.begin(), ArgArr.end()); // FIXME: Handle '@' args (or at least error on them). MissingArgIndex = MissingArgCount = 0; - unsigned Index = 0, End = ArgEnd - ArgBegin; + unsigned Index = 0, End = ArgArr.size(); while (Index < End) { // Ingore nullptrs, they are response file's EOL markers if (Args->getArgString(Index) == nullptr) { |