[clang] [ClangIR] Support bool-returning await_suspend (PR #227527)

Aman Maurya via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 20:56:47 PDT 2026


================
@@ -1,24 +1,48 @@
-// RUN: cir-opt %s --verify-roundtrip | FileCheck %s
-
-cir.func coroutine @checkPrintParse(%arg0 : !cir.bool) {
-  cir.coro.body {
-    cir.await(user, ready : {
-      cir.condition(%arg0)
-    }, suspend : {
-      cir.yield
-    }, resume : {
-      cir.yield
-    },)
-    cir.yield
-  }
-  cir.return
-}
-
-// CHECK:  cir.func coroutine @checkPrintParse
-// CHECK:  cir.await(user, ready : {
-// CHECK:    cir.condition(%arg0)
-// CHECK:  }, suspend : {
-// CHECK:    cir.yield
-// CHECK:  }, resume : {
-// CHECK:    cir.yield
-// CHECK:  },)
+// RUN: cir-opt %s --verify-roundtrip | FileCheck %s
+
+cir.func coroutine @checkPrintParse(%arg0 : !cir.bool) {
----------------
amanmaurya92 wrote:

np, I have resolved the conflicts and tested locally as well. Please take a look and tell me if this looks good to you now.

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


More information about the cfe-commits mailing list