[Mlir-commits] [mlir] [emitC]Option to mlir-translate class instead of function (PR #141158)
Mehdi Amini
llvmlistbot at llvm.org
Thu May 29 12:16:10 PDT 2025
================
@@ -33,13 +33,50 @@ void registerToCppTranslation() {
"file-id", llvm::cl::desc("Emit emitc.file ops with matching id"),
llvm::cl::init(""));
+ static llvm::cl::opt<bool> emitClass(
+ "emit-class",
+ llvm::cl::desc("If specified, the output will be a class where "
+ "the function(s) in the module are methods "
+ "Enables class-related options"),
+ llvm::cl::init(false));
+
+ static llvm::cl::opt<std::string> className(
+ "class-name",
+ llvm::cl::desc("Mandatory class name if --emit-class is set"),
+ llvm::cl::init(""));
----------------
joker-eph wrote:
Nit: I don't think we need two options: just name it `-emit-class=<classname>` and check if this isn't empty.
https://github.com/llvm/llvm-project/pull/141158
More information about the Mlir-commits
mailing list