[Mlir-commits] [mlir] [MLIR][mlir-opt] Add `registerationAndParseCLIOptions` for `MlirOptMain`. (PR #70581)

weiwei chen llvmlistbot at llvm.org
Sun Oct 29 19:22:17 PDT 2023


================
@@ -229,6 +229,13 @@ class MlirOptMainConfig {
 /// the loaded IR.
 using PassPipelineFn = llvm::function_ref<LogicalResult(PassManager &pm)>;
 
+/// Register all dialects and parse command line options.
+/// - toolName is used for the header displayed by `--help`.
+/// - registry should contain all the dialects that can be parsed in the source.
+std::pair<std::string, std::string>
+registrationAndParseCLIOptions(int argc, char **argv, llvm::StringRef toolName,
----------------
weiweichen wrote:

> Also, could you comment what it returns? It's not clear by looking at the header.

Sure, updated.

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


More information about the Mlir-commits mailing list