[Mlir-commits] [mlir] f2cdccc - [mlir-opt] Fix dialect preload after fb1bb6a
Goran Flegar
llvmlistbot at llvm.org
Mon Mar 6 10:31:53 PST 2023
Author: Goran Flegar
Date: 2023-03-06T19:30:14+01:00
New Revision: f2cdccc034d0696f186f55d6826dd6ac40e4d3d5
URL: https://github.com/llvm/llvm-project/commit/f2cdccc034d0696f186f55d6826dd6ac40e4d3d5
DIFF: https://github.com/llvm/llvm-project/commit/f2cdccc034d0696f186f55d6826dd6ac40e4d3d5.diff
LOG: [mlir-opt] Fix dialect preload after fb1bb6a
Also pipe empty string to the commandline test to make sure it does
not hang on some configurations.
Added:
Modified:
mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
mlir/test/mlir-opt/commandline.mlir
Removed:
################################################################################
diff --git a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
index 27770751853cf..03fcd958761c2 100644
--- a/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
+++ b/mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
@@ -336,6 +336,7 @@ LogicalResult mlir::MlirOptMain(int argc, char **argv, llvm::StringRef toolName,
// Parse pass names in main to ensure static initialization completed.
cl::ParseCommandLineOptions(argc, argv, helpHeader);
MlirOptMainConfig config = MlirOptMainConfig::createFromCLOptions();
+ config.preloadDialectsInContext(preloadDialectsInContext);
// Set up the input file.
std::string errorMessage;
diff --git a/mlir/test/mlir-opt/commandline.mlir b/mlir/test/mlir-opt/commandline.mlir
index bdcdf9de29ff8..b953155e22539 100644
--- a/mlir/test/mlir-opt/commandline.mlir
+++ b/mlir/test/mlir-opt/commandline.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt --show-dialects | FileCheck %s
+// RUN: echo "" | mlir-opt --show-dialects | FileCheck %s
// CHECK: Available Dialects:
// CHECK-NEXT: acc
// CHECK-NEXT: affine
More information about the Mlir-commits
mailing list