[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.
This commit is contained in:
Goran Flegar
2023-03-06 19:11:03 +01:00
parent e0cd60f1d5
commit f2cdccc034
2 changed files with 2 additions and 1 deletions

View File

@@ -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;

View File

@@ -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