Author: Andrew Young Date: 2021-01-05T19:17:01-08:00 New Revision: 91f17ba24e86bfdd6e794e564f1e562b1d25e156
URL: https://github.com/llvm/llvm-project/commit/91f17ba24e86bfdd6e794e564f1e562b1d25e156 DIFF: https://github.com/llvm/llvm-project/commit/91f17ba24e86bfdd6e794e564f1e562b1d25e156.diff LOG: [mlir] Print the correct tool name in mlirTranslateMain The passed in tool name is not used, causing the wrong tool name to be printed by the help text. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D94120 Added: mlir/test/mlir-translate/commandline.mlir Modified: mlir/lib/Translation/Translation.cpp Removed: ################################################################################ diff --git a/mlir/lib/Translation/Translation.cpp b/mlir/lib/Translation/Translation.cpp index 5c5ecb7e46c4..3c17ea237085 100644 --- a/mlir/lib/Translation/Translation.cpp +++ b/mlir/lib/Translation/Translation.cpp @@ -157,7 +157,7 @@ LogicalResult mlir::mlirTranslateMain(int argc, char **argv, llvm::cl::Required); registerAsmPrinterCLOptions(); registerMLIRContextCLOptions(); - llvm::cl::ParseCommandLineOptions(argc, argv, "MLIR translation driver\n"); + llvm::cl::ParseCommandLineOptions(argc, argv, toolName); std::string errorMessage; auto input = openInputFile(inputFilename, &errorMessage); diff --git a/mlir/test/mlir-translate/commandline.mlir b/mlir/test/mlir-translate/commandline.mlir new file mode 100644 index 000000000000..e55e7346cf48 --- /dev/null +++ b/mlir/test/mlir-translate/commandline.mlir @@ -0,0 +1,2 @@ +// RUN: mlir-translate --help | FileCheck %s +// CHECK: OVERVIEW: MLIR Translation Testing Tool \ No newline at end of file _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits