From 49516aa306d8d534fec3a8b57a8ff95d5241766b Mon Sep 17 00:00:00 2001 From: "Tiutiu, Natan-Gabriel" Date: Tue, 11 Jun 2024 18:48:04 +0300 Subject: [PATCH] changed the order in which the arguments are parsed --- mlir/lib/Tools/mlir-opt/MlirOptMain.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp index ea79ee619061..cc5acd163418 100644 --- a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp +++ b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp @@ -562,14 +562,9 @@ LogicalResult mlir::MlirOptMain(int argc, char **argv, llvm::StringRef toolName, [&](auto name) { os << name; }); } - // It is not possible to place a call after command line parser - // since not all options are registered at the moment - additionalRegistration(helpHeader); - MlirOptMainConfig::registerCLOptions(registry); + additionalRegistration(helpHeader); - // Parse pass names in main to ensure static initialization completed. - cl::ParseCommandLineOptions(argc, argv, helpHeader); MlirOptMainConfig config = MlirOptMainConfig::createFromCLOptions(); // When reading from stdin and the input is a tty, it is often a user mistake