================
@@ -1388,7 +1388,8 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl 
&gd, unsigned builtinID,
     return coroBeg ? RValue::get(coroBeg.getResult())
                    : getUndefRValue(e->getType());
   }
-
+  case Builtin::BI__builtin_coro_end:
+    return RValue::get(emitCoroEndBuiltinCall(e).getResultToken());
----------------
Andres-Salamanca wrote:

Thanks for catching this! I think this is not quite right, though. 
`llvm.coro.end` actually returns `void`, as you can see in the 
https://llvm.org/docs/Coroutines.html#llvm-coro-end-intrinsic and in 
[`Intrinsics.td`](https://github.com/llvm/llvm-project/blob/8f695805904edad671892e624a4ada4031f3da1e/llvm/include/llvm/IR/Intrinsics.td#L1994).
 I changed it to `(outs CIR_AnyVoidType:$result)` so it can return a value and 
`RValue::get()` can use it.

https://github.com/llvm/llvm-project/pull/214125
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to