Lines Matching refs:SC
181 void addLiteralOption(Option &Opt, SubCommand *SC, StringRef Name) { in addLiteralOption() argument
184 if (!SC->OptionsMap.insert(std::make_pair(Name, &Opt)).second) { in addLiteralOption()
192 if (SC == &*AllSubCommands) { in addLiteralOption()
194 if (SC == Sub) in addLiteralOption()
205 for (auto *SC : Opt.Subs) in addLiteralOption() local
206 addLiteralOption(Opt, SC, Name); in addLiteralOption()
210 void addOption(Option *O, SubCommand *SC) { in addOption() argument
215 SC->OptionsMap.find(O->ArgStr) != SC->OptionsMap.end()) in addOption()
219 if (!SC->OptionsMap.insert(std::make_pair(O->ArgStr, O)).second) { in addOption()
228 SC->PositionalOpts.push_back(O); in addOption()
230 SC->SinkOpts.push_back(O); in addOption()
232 if (SC->ConsumeAfterOpt) { in addOption()
236 SC->ConsumeAfterOpt = O; in addOption()
248 if (SC == &*AllSubCommands) { in addOption()
250 if (SC == Sub) in addOption()
266 for (auto *SC : O->Subs) in addOption() local
267 addOption(O, SC); in addOption()
271 void removeOption(Option *O, SubCommand *SC) { in removeOption() argument
277 SubCommand &Sub = *SC; in removeOption()
309 for (auto *SC : RegisteredSubCommands) in removeOption() local
310 removeOption(O, SC); in removeOption()
312 for (auto *SC : O->Subs) in removeOption() local
313 removeOption(O, SC); in removeOption()
333 void updateArgStr(Option *O, StringRef NewName, SubCommand *SC) { in updateArgStr() argument
334 SubCommand &Sub = *SC; in updateArgStr()
348 for (auto *SC : RegisteredSubCommands) in updateArgStr() local
349 updateArgStr(O, NewName, SC); in updateArgStr()
351 for (auto *SC : O->Subs) in updateArgStr() local
352 updateArgStr(O, NewName, SC); in updateArgStr()
1327 for (auto *SC : RegisteredSubCommands) { in ResetAllOptionOccurrences() local
1328 for (auto &O : SC->OptionsMap) in ResetAllOptionOccurrences()