Home | History | Annotate | Download | only in Driver

Lines Matching refs:Index

117 Arg *OptionGroup::accept(const ArgList &Args, unsigned &Index) const {
125 Arg *InputOption::accept(const ArgList &Args, unsigned &Index) const {
133 Arg *UnknownOption::accept(const ArgList &Args, unsigned &Index) const {
142 Arg *FlagOption::accept(const ArgList &Args, unsigned &Index) const {
145 if (getName().size() != strlen(Args.getArgString(Index)))
148 return new Arg(getUnaliasedOption(), Index++);
156 Arg *JoinedOption::accept(const ArgList &Args, unsigned &Index) const {
158 const char *Value = Args.getArgString(Index) + getName().size();
159 return new Arg(getUnaliasedOption(), Index++, Value);
169 unsigned &Index) const {
171 const char *Str = Args.getArgString(Index) + getName().size();
172 Arg *A = new Arg(getUnaliasedOption(), Index++);
203 Arg *SeparateOption::accept(const ArgList &Args, unsigned &Index) const {
206 if (getName().size() != strlen(Args.getArgString(Index)))
209 Index += 2;
210 if (Index > Args.getNumInputArgStrings())
213 return new Arg(getUnaliasedOption(), Index - 2, Args.getArgString(Index - 1));
223 Arg *MultiArgOption::accept(const ArgList &Args, unsigned &Index) const {
226 if (getName().size() != strlen(Args.getArgString(Index)))
229 Index += 1 + NumArgs;
230 if (Index > Args.getNumInputArgStrings())
233 Arg *A = new Arg(getUnaliasedOption(), Index - 1 - NumArgs,
234 Args.getArgString(Index - NumArgs));
236 A->getValues().push_back(Args.getArgString(Index - NumArgs + i));
248 unsigned &Index) const {
251 if (getName().size() != strlen(Args.getArgString(Index))) {
252 const char *Value = Args.getArgString(Index) + getName().size();
253 return new Arg(this, Index++, Value);
257 Index += 2;
258 if (Index > Args.getNumInputArgStrings())
261 return new Arg(getUnaliasedOption(), Index - 2, Args.getArgString(Index - 1));
272 unsigned &Index) const {
275 Index += 2;
276 if (Index > Args.getNumInputArgStrings())
279 return new Arg(getUnaliasedOption(), Index - 2,
280 Args.getArgString(Index-2)+getName().size(),
281 Args.getArgString(Index-1));