[Mlir-commits] [mlir] [mlir][emitC] Add support to emitter for `classop`, `fieldop` and `getfieldop` (PR #145605)

Jacques Pienaar llvmlistbot at llvm.org
Tue Jun 24 22:37:46 PDT 2025


================
@@ -997,6 +997,61 @@ static LogicalResult printOperation(CppEmitter &emitter, ModuleOp moduleOp) {
   return success();
 }
 
+static LogicalResult printOperation(CppEmitter &emitter, ClassOp classOp) {
+  CppEmitter::Scope classScope(emitter);
+  raw_indented_ostream &os = emitter.ostream();
+  os << "class " << classOp.getSymName() << " final {\n";
+  os << "public:\n\n";
+
+  os.indent();
+  os << "const std::map<std::string, char*> _buffer_map {\n";
----------------
jpienaar wrote:

This does not seem specific to ClassOp but some usage of it. So these should be introduced before translation.

https://github.com/llvm/llvm-project/pull/145605


More information about the Mlir-commits mailing list