================
@@ -274,11 +274,16 @@ cir::CoroBeginOp
CIRGenFunction::emitCoroBeginBuiltinCall(const CallExpr *e) {
return coroBegin;
}
-cir::CoroEndOp CIRGenFunction::emitCoroEndBuiltinCall(mlir::Location loc,
- mlir::Value nullPtr) {
- return cir::CoroEndOp::create(
- cgm.getBuilder(), loc,
- mlir::ValueRange{nullPtr, builder.getBool(false, loc)});
+cir::CoroEndOp CIRGenFunction::emitCoroEndBuiltinCall(const CallExpr *e) {
+
+ mlir::Location loc = getLoc(e->getBeginLoc());
+ CIRGenBuilderTy &builder = cgm.getBuilder();
+ llvm::SmallVector<mlir::Value, 3> args;
+ for (const Expr *arg : e->arguments())
+ args.push_back(emitScalarExpr(arg));
+ auto tkNone = cir::TokenNoneOp::create(builder, loc);
+ args.push_back(tkNone.getResult());
----------------
Andres-Salamanca wrote:
Done
https://github.com/llvm/llvm-project/pull/214125
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits