summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Option
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-06-21 06:31:53 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-06-21 06:31:53 +0000
commit259f61d4b8f78638d18578488c18538b8f26f6d2 (patch)
treed7e68d6b3bdce4bf1929f3b326f70eeda2163249 /llvm/lib/Option
parent1a109285c29d554494d1021c7a2e7550192b414b (diff)
downloadbcm5719-llvm-259f61d4b8f78638d18578488c18538b8f26f6d2.tar.gz
bcm5719-llvm-259f61d4b8f78638d18578488c18538b8f26f6d2.zip
ArrayRef-ify ParseArgs
llvm-svn: 240233
Diffstat (limited to 'llvm/lib/Option')
-rw-r--r--llvm/lib/Option/OptTable.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Option/OptTable.cpp b/llvm/lib/Option/OptTable.cpp
index c37f193fa64..cec1717454f 100644
--- a/llvm/lib/Option/OptTable.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud