[Mlir-commits] [mlir] [mlir] Fixing a regression that '-D' option of llvm-tblgen is unregistered. (PR #91329)
Daniel Chen
llvmlistbot at llvm.org
Fri May 10 16:51:41 PDT 2024
================
@@ -62,6 +62,16 @@ int main(int argc, char **argv) {
"write-if-changed",
llvm::cl::desc("Only write to the output file if it changed"));
+ // `ResetCommandLineParser` at the above unregistered the "D" option
+ // of `llvm-tblgen`, which caused `TestOps.cpp` to fail due to
+ // "Unknnown command line argument '-D...`" when a macros name is
+ // present. The following is a workaround to re-register it again.
+ llvm::cl::list<std::string> MacroNames(
----------------
DanielCChen wrote:
Good catch. This code is coming from `llvm/lib/TableGen/Main.cpp` where `llvm-tblgen` sets its `cl` options. It seems LLVM always use uppercase for `cl` option variables, but MLIR uses lowercase. I am not sure if we should keep it consistent with LLVM or keep using lowercase in MLIR.
https://github.com/llvm/llvm-project/pull/91329
More information about the Mlir-commits
mailing list