This repository was archived by the owner on Nov 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
mlir/tools/mlir-src-sharder Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ function(tablegen project ofn)
8181 endif ()
8282
8383 if (NOT LLVM_ENABLE_WARNINGS)
84- list (APPEND LLVM_TABLEGEN_FLAGS "-Dno -warn-on-unused-template-args" )
84+ list (APPEND LLVM_TABLEGEN_FLAGS "--no -warn-on-unused-template-args" )
8585 endif ()
8686
8787 # We need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list
Original file line number Diff line number Diff line change @@ -72,6 +72,14 @@ int main(int argc, char **argv) {
7272 " Name of the macro to be defined -- ignored by mlir-src-sharder" ),
7373 llvm::cl::value_desc (" macro name" ), llvm::cl::Prefix);
7474
75+ // CMake/TableGen pass this flag, re-registering after ResetCommandLineParser
76+ // avoids "unknown argument" errors.
77+ // TODO: Investigate if mlir-src-sharder's argument parsing can be
78+ // aligned with generic tablegen options more broadly.
79+ llvm::cl::opt<bool > noWarnOnUnusedTemplateArg (
80+ " no-warn-on-unused-template-args" ,
81+ llvm::cl::desc (" Disable unused template argument warnings." ));
82+
7583 llvm::InitLLVM y (argc, argv);
7684 llvm::cl::ParseCommandLineOptions (argc, argv);
7785
You can’t perform that action at this time.
0 commit comments