mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
ArrayRef-ify ParseArgs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240233 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user