================
@@ -267,11 +299,39 @@ CIRGenFunction::emitCoroutineBody(const CoroutineBodyStmt
&s) {
/*isInit*/ true);
assert(!cir::MissingFeatures::ehCleanupScope());
- // FIXME(cir): EHStack.pushCleanup<CallCoroEnd>(EHCleanup);
+
curCoro.data->currentAwaitKind = cir::AwaitKind::Init;
if (emitStmt(s.getInitSuspendStmt(), /*useCurrentScope=*/true).failed())
return mlir::failure();
- assert(!cir::MissingFeatures::emitBodyAndFallthrough());
+
+ curCoro.data->currentAwaitKind = cir::AwaitKind::User;
+
+ // FIXME(cir): wrap emitBodyAndFallthrough with try/catch bits.
+ if (s.getExceptionHandler())
+ assert(!cir::MissingFeatures::unhandledException());
----------------
andykaylor wrote:
Can you make this something more specific like `coroutineExceptions`?
https://github.com/llvm/llvm-project/pull/171755
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits