@@ -69,15 +69,14 @@ cir::CallOp CIRGenFunction::emitCoroIDBuiltinCall(mlir::Location loc,
6969
7070cir::CallOp CIRGenFunction::emitCoroAllocBuiltinCall (mlir::Location loc) {
7171 cir::BoolType boolTy = builder.getBoolTy ();
72- cir::IntType int32Ty = builder.getUInt32Ty ();
7372
7473 mlir::Operation *builtin = cgm.getGlobalValue (cgm.builtinCoroAlloc );
7574
7675 cir::FuncOp fnOp;
7776 if (!builtin) {
7877 fnOp = cgm.createCIRBuiltinFunction (loc, cgm.builtinCoroAlloc ,
79- cir::FuncType::get ({int32Ty }, boolTy),
80- /* FD =*/ nullptr );
78+ cir::FuncType::get ({UInt32Ty }, boolTy),
79+ /* fd =*/ nullptr );
8180 assert (fnOp && " should always succeed" );
8281 } else {
8382 fnOp = cast<cir::FuncOp>(builtin);
@@ -90,15 +89,14 @@ cir::CallOp CIRGenFunction::emitCoroAllocBuiltinCall(mlir::Location loc) {
9089cir::CallOp
9190CIRGenFunction::emitCoroBeginBuiltinCall (mlir::Location loc,
9291 mlir::Value coroframeAddr) {
93- cir::IntType int32Ty = builder.getUInt32Ty ();
9492 mlir::Operation *builtin = cgm.getGlobalValue (cgm.builtinCoroBegin );
9593
9694 cir::FuncOp fnOp;
9795 if (!builtin) {
9896 fnOp = cgm.createCIRBuiltinFunction (
9997 loc, cgm.builtinCoroBegin ,
100- cir::FuncType::get ({int32Ty , VoidPtrTy}, VoidPtrTy),
101- /* FD =*/ nullptr );
98+ cir::FuncType::get ({UInt32Ty , VoidPtrTy}, VoidPtrTy),
99+ /* fd =*/ nullptr );
102100 assert (fnOp && " should always succeed" );
103101 } else {
104102 fnOp = cast<cir::FuncOp>(builtin);
@@ -149,7 +147,7 @@ CIRGenFunction::emitCoroutineBody(const CoroutineBodyStmt &s) {
149147
150148 // Handle allocation failure if 'ReturnStmtOnAllocFailure' was provided.
151149 if (s.getReturnStmtOnAllocFailure ())
152- cgm.errorNYI (" NYI " );
150+ cgm.errorNYI (" handle coroutine return alloc failure " );
153151
154152 assert (!cir::MissingFeatures::generateDebugInfo ());
155153 assert (!cir::MissingFeatures::emitBodyAndFallthrough ());
0 commit comments