[Mlir-commits] [mlir] [MLIR] emitc: Add emitc.file op (PR #123298)

Gil Rapaport llvmlistbot at llvm.org
Sun Feb 2 09:58:41 PST 2025


================
@@ -1742,7 +1767,8 @@ LogicalResult CppEmitter::emitTupleType(Location loc, ArrayRef<Type> types) {
 }
 
 LogicalResult emitc::translateToCpp(Operation *op, raw_ostream &os,
-                                    bool declareVariablesAtTop) {
-  CppEmitter emitter(os, declareVariablesAtTop);
+                                    bool declareVariablesAtTop,
+                                    StringRef fileId) {
+  CppEmitter emitter(os, declareVariablesAtTop, fileId);
   return emitter.emitOperation(*op, /*trailingSemicolon=*/false);
----------------
aniragil wrote:

`trailingSemicolon` should be set to `true`, but I'm guessing you set it to `false` to be consistent with ModuleOp which does the same (relying on GlobalVariableOp to print its semicolon), right?

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


More information about the Mlir-commits mailing list