[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 2 11:27:38 PDT 2025


================
@@ -119,6 +143,22 @@ class LLVM_ABI OptTable {
     }
   };
 
+public:
+  bool isValidForSubCommand(const Info *CandidateInfo,
+                            StringRef SubCommand) const {
+    assert(!SubCommand.empty() &&
+           "This helper is only for valid registered subcommands.");
+    typename ArrayRef<OptTable::SubCommand>::iterator SCIT =
----------------
PiJoules wrote:

Can probably save a line and just use `auto` here since it's probably well known that `std::find*` functions return an iterator.

https://github.com/llvm/llvm-project/pull/155026


More information about the cfe-commits mailing list