[llvm] [CGData] Declare command line options in TableGen, one struct per library (PR #226087)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 02:37:30 PDT 2026


================
@@ -2316,6 +2317,33 @@ LLVM_ABI void ResetCommandLineParser();
 /// Parses `Arg` into the option handler `Handler`.
 LLVM_ABI bool ProvidePositionalOption(Option *Handler, StringRef Arg, int i);
 
+/// The options of a library that declares them in TableGen rather than as
+/// cl::opt (see llvm/Option/LibraryOptions.h). ParseCommandLineOptions hands
+/// every argument naming one of them to parse().
+class LLVM_ABI LibraryOptions {
----------------
aengelke wrote:

Do we expect more users of LibraryOptions? I expect this will go away eventually and is only for porting? This should be added to the comment.

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


More information about the llvm-commits mailing list