================
@@ -202,6 +205,42 @@ void ArgList::print(raw_ostream &O) const {
 LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); }
 #endif
 
+StringRef ArgList::getSubcommand(
+    const ArrayRef<OptTable::Command> Commands,
+    std::function<void(ArrayRef<StringRef>)> HandleMultipleSubcommands,
+    std::function<void(ArrayRef<StringRef>)> HandleOtherPositionals) const {
+
+  StringRef SubCommand = {};
+  SmallVector<StringRef, 4> SubCommands;
+  SmallVector<StringRef, 4> OtherPositionals;
+  for (const Arg *A : *this) {
+    bool IsSubCommand = false;
----------------
PiJoules wrote:

This can be moved into the `if` body below

https://github.com/llvm/llvm-project/pull/155026
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to