llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Kunal Dubey  (xakep8)

<details>
<summary>Changes</summary>

Add CIR generation for await_suspend methods that return a coroutine handle. 
This enables one coroutine to resume another.

---

Patch is 22.86 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/240737.diff


8 Files Affected:

- (modified) clang/include/clang/CIR/Dialect/IR/CIROps.td (+21) 
- (modified) clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp (+127-2) 
- (modified) clang/lib/CIR/CodeGen/CIRGenFunction.h (+11) 
- (modified) clang/lib/CIR/CodeGen/CIRGenTypes.cpp (+12) 
- (modified) clang/lib/CIR/CodeGen/CIRGenTypes.h (+4) 
- (modified) clang/lib/CodeGen/CGCoroutine.cpp (+78-77) 
- (modified) clang/test/CIR/CodeGenCoroutines/Inputs/coroutine.h (+2) 
- (added) clang/test/CIR/CodeGenCoroutines/coro-await-suspend-handle.cpp (+35) 


``````````diff
diff --git a/clang/include/clang/CIR/Dialect/IR/CIROps.td 
b/clang/include/clang/CIR/Dialect/IR/CIROps.td
index b6f35179be1d64..992a1adf802895 100644
--- a/clang/include/clang/CIR/Dialect/IR/CIROps.td
+++ b/clang/include/clang/CIR/Dialect/IR/CIROps.td
@@ -5331,6 +5331,27 @@ def CIR_CoroSuspendOp : CIR_CoroIntrinsicOp<"suspend",
   let llvmOp = "CoroSuspendOp";
 }
 
+//===----------------------------------------------------------------------===//
+// Coroutine intrinsic AwaitSuspendHandleOp
+//===----------------------------------------------------------------------===//
+
+def CIR_CoroAwaitSuspendHandleOp :
+    CIR_CoroIntrinsicOp<"await.suspend.handle",
+      (ins CIR_AnyPtrType:$awaiter,
+           CIR_VoidPtrType:$frame,
+           CIR_PtrToFunc:$wrapper),
+      (outs)> {
+  let summary = "Represents llvm.coro.await.suspend.handle";
+  let description = [{
+    Performs an await-suspend operation that returns another coroutine handle.
+    The wrapper invokes await_suspend using the awaiter and current coroutine
+    frame. The returned handle identifies the coroutine resumed by symmetric
+    transfer.
+  }];
+
+  let llvmOp = "CoroAwaitSuspendHandleOp";
+}
+
 
//===----------------------------------------------------------------------===//
 // Coroutine intrinsic SaveOp
 
//===----------------------------------------------------------------------===//
diff --git a/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp 
b/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
index 162fc61bbcf93b..a7d8066da0fe00 100644
--- a/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
@@ -17,6 +17,8 @@
 #include "clang/Basic/TargetInfo.h"
 #include "clang/CIR/Dialect/IR/CIRDialect.h"
 #include "clang/CIR/MissingFeatures.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/Twine.h"
 
 using namespace clang;
 using namespace clang::CIRGen;
@@ -26,6 +28,8 @@ struct clang::CIRGen::CGCoroData {
   // await/yield expressions were encountered so far.
   // These are used to generate pretty labels for await expressions in LLVM IR.
   cir::AwaitKind currentAwaitKind = cir::AwaitKind::Init;
+  unsigned awaitNum = 0;
+  unsigned yieldNum = 0;
   // Stores the __builtin_coro_id emitted in the function so that we can supply
   // it as the first argument to other builtins.
   cir::CoroIdOp coroId = nullptr;
@@ -61,6 +65,34 @@ CIRGenFunction::CGCoroInfo::CGCoroInfo() {}
 CIRGenFunction::CGCoroInfo::~CGCoroInfo() {}
 
 namespace {
+static llvm::SmallString<32> buildSuspendPointName(CGCoroData &coro,
+                                                   cir::AwaitKind kind) {
+  llvm::StringRef name;
+  unsigned number = 0;
+
+  switch (kind) {
+  case cir::AwaitKind::Init:
+    name = "init";
+    break;
+  case cir::AwaitKind::User:
+    name = "await";
+    number = ++coro.awaitNum;
+    break;
+  case cir::AwaitKind::Yield:
+    name = "yield";
+    number = ++coro.yieldNum;
+    break;
+  case cir::AwaitKind::Final:
+    name = "final";
+    break;
+  }
+
+  llvm::SmallString<32> result(name);
+  if (number > 1)
+    llvm::Twine(number).toVector(result);
+
+  return result;
+}
 // FIXME: both GetParamRef and ParamReferenceReplacerRAII are good template
 // candidates to be shared among LLVM / CIR codegen.
 
@@ -124,10 +156,83 @@ RValue CIRGenFunction::emitCoroutineFrame() {
   if (curCoro.data && curCoro.data->coroBegin) {
     return RValue::get(curCoro.data->coroBegin);
   }
+
+  if (curAwaitSuspendWrapper.framePtr)
+    return RValue::get(curAwaitSuspendWrapper.framePtr);
+
   cgm.errorNYI("NYI");
   return RValue();
 }
 
+cir::FuncOp
+CIRGenFunction::generateAwaitSuspendWrapper(llvm::StringRef coroutineName,
+                                            llvm::StringRef suspendPointName,
+                                            const CoroutineSuspendExpr &s) {
+  llvm::SmallString<128> functionName(coroutineName);
+  functionName += ".__await_suspend_wrapper__";
+  functionName += suspendPointName;
+
+  ASTContext &context = getContext();
+
+  auto *awaiterDecl = ImplicitParamDecl::Create(context, context.VoidPtrTy,
+                                                ImplicitParamKind::Other);
+  auto *frameDecl = ImplicitParamDecl::Create(context, context.VoidPtrTy,
+                                              ImplicitParamKind::Other);
+
+  QualType returnTy = s.getSuspendExpr()->getType();
+
+  FunctionArgList args;
+  args.push_back(awaiterDecl);
+  args.push_back(frameDecl);
+
+  const CIRGenFunctionInfo &functionInfo =
+      cgm.getTypes().arrangeBuiltinFunctionDeclaration(returnTy, args);
+
+  cir::FuncType functionType = cgm.getTypes().getFunctionType(functionInfo);
+
+  cir::FuncOp function =
+      cgm.createCIRFunction(getLoc(s.getSourceRange()), functionName,
+                            functionType, /*funcDecl=*/nullptr);
+
+  function.setLinkage(cir::GlobalLinkageKind::InternalLinkage);
+
+  cgm.setCIRFunctionAttributes(GlobalDecl(), functionInfo, function,
+                               /*isThunk=*/false);
+
+  mlir::OpBuilder::InsertionGuard insertionGuard(builder);
+  SourceLocRAIIObject functionLocation(*this, s.getSourceRange());
+
+  mlir::Location location = getLoc(s.getSourceRange());
+  mlir::Block *entryBlock = function.addEntryBlock();
+
+  SymTableScopeTy variableScope(symbolTable);
+  {
+    LexicalScope lexicalScope(*this, location, entryBlock);
+    startFunction(GlobalDecl(), returnTy, function, functionType, args,
+                  s.getBeginLoc(), s.getBeginLoc());
+    mlir::Value awaiterPtr =
+        builder.createLoad(location, getAddrOfLocalVar(awaiterDecl));
+
+    QualType awaiterTy = s.getOpaqueValue()->getType();
+    mlir::Type awaiterType = convertTypeForMem(awaiterTy);
+    awaiterPtr = builder.createPtrBitcast(awaiterPtr, awaiterType);
+
+    LValue awaiterLValue = makeNaturalAlignAddrLValue(awaiterPtr, awaiterTy);
+    curAwaitSuspendWrapper.framePtr =
+        builder.createLoad(location, getAddrOfLocalVar(frameDecl));
+
+    OpaqueValueMapping awaiterBinder(*this, s.getOpaqueValue(), awaiterLValue);
+
+    mlir::Value suspendResult = emitScalarExpr(s.getSuspendExpr());
+    if (suspendResult)
+      builder.createStore(location, suspendResult, returnValue);
+
+    curAwaitSuspendWrapper.framePtr = nullptr;
+    finishFunction(s.getEndLoc());
+  }
+  return function;
+}
+
 static void createCoroData(CIRGenFunction &cgf,
                            CIRGenFunction::CGCoroInfo &curCoro,
                            cir::CoroIdOp coroId,
@@ -718,6 +823,7 @@ emitSuspendExpression(CIRGenFunction &cgf, CGCoroData &coro,
   CIRGenFunction::OpaqueValueMapping binder =
       CIRGenFunction::OpaqueValueMapping(cgf, s.getOpaqueValue());
   CIRGenBuilderTy &builder = cgf.getBuilder();
+  llvm::SmallString<32> suspendPointName = buildSuspendPointName(coro, kind);
 
   // Exception handling requires additional IR. We avoid generating it when
   // neither the await_resume() call nor the destruction of its result can
@@ -784,8 +890,27 @@ emitSuspendExpression(CIRGenFunction &cgf, CGCoroData 
&coro,
           cir::CoroSuspendPoint::create(builder, loc);
           break;
         case CoroutineSuspendExpr::SuspendReturnType::SuspendHandle:
-          cgf.cgm.errorNYI(s.getSourceRange(),
-                           "await_suspend returning handle");
+          cir::FuncOp coroutineFunction = mlir::cast<cir::FuncOp>(cgf.curFn);
+
+          CIRGenFunction wrapperCGF(cgf.cgm, builder);
+
+          cir::FuncOp suspendWrapper = wrapperCGF.generateAwaitSuspendWrapper(
+              coroutineFunction.getSymName(), suspendPointName, s);
+
+          mlir::Value awaiterPointer =
+              cgf.getOrCreateOpaqueLValueMapping(s.getOpaqueValue())
+                  .getPointer();
+
+          assert(coro.coroBegin && "expected coroutine frame");
+
+          cir::PointerType wrapperPointerType =
+              cir::PointerType::get(suspendWrapper.getFunctionType());
+
+          mlir::Value wrapperPointer = cir::GetGlobalOp::create(
+              builder, loc, wrapperPointerType, suspendWrapper.getSymName());
+
+          cir::CoroAwaitSuspendHandleOp::create(builder, loc, awaiterPointer,
+                                                coro.coroBegin, 
wrapperPointer);
           cir::CoroSuspendPoint::create(builder, loc);
           break;
         }
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.h 
b/clang/lib/CIR/CodeGen/CIRGenFunction.h
index f9483d9aac8ce1..1930ad435a2bac 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.h
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.h
@@ -118,6 +118,14 @@ class CIRGenFunction : public CIRGenTypeCache {
   };
   CGCoroInfo curCoro;
 
+  // Holds the coroutine frame parameter while generating an await_suspend
+  // wrapper. The wrapper is not itself a coroutine, so it has no coro.begin.
+  struct AwaitSuspendWrapperInfo {
+    mlir::Value framePtr;
+  };
+
+  AwaitSuspendWrapperInfo curAwaitSuspendWrapper;
+
   bool isCoroutine() const { return curCoro.data != nullptr; }
 
   /// The temporary alloca to hold the return value. This is
@@ -2119,6 +2127,9 @@ class CIRGenFunction : public CIRGenTypeCache {
   LValue emitCompoundLiteralLValue(const CompoundLiteralExpr *e);
 
   void emitConstructorBody(FunctionArgList &args);
+  cir::FuncOp generateAwaitSuspendWrapper(llvm::StringRef coroutineName,
+                                          llvm::StringRef suspendPointName,
+                                          const CoroutineSuspendExpr &s);
 
   mlir::LogicalResult emitCoroutineBody(const CoroutineBodyStmt &s);
   cir::CoroEndOp emitCoroEndBuiltinCall(const CallExpr *e);
diff --git a/clang/lib/CIR/CodeGen/CIRGenTypes.cpp 
b/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
index a030d5dc39eff1..515145a77526f5 100644
--- a/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenTypes.cpp
@@ -871,6 +871,18 @@ const CIRGenFunctionInfo 
&CIRGenTypes::arrangeGlobalDeclaration(GlobalDecl gd) {
   return arrangeFunctionDeclaration(fd);
 }
 
+const CIRGenFunctionInfo &
+CIRGenTypes::arrangeBuiltinFunctionDeclaration(QualType resultType,
+                                               const FunctionArgList &args) {
+  SmallVector<CanQualType, 16> argTypes;
+  for (const VarDecl *arg : args)
+    argTypes.push_back(astContext.getCanonicalParamType(arg->getType()));
+
+  return arrangeCIRFunctionInfo(resultType->getCanonicalTypeUnqualified(),
+                                /*isInstanceMethod=*/false, argTypes,
+                                FunctionType::ExtInfo(), RequiredArgs::All);
+}
+
 // When we find the full definition for a TagDecl, replace the 'opaque' type we
 // previously made for it if applicable.
 void CIRGenTypes::updateCompletedType(const TagDecl *td) {
diff --git a/clang/lib/CIR/CodeGen/CIRGenTypes.h 
b/clang/lib/CIR/CodeGen/CIRGenTypes.h
index 852e1f4ab66993..db36797a1f742d 100644
--- a/clang/lib/CIR/CodeGen/CIRGenTypes.h
+++ b/clang/lib/CIR/CodeGen/CIRGenTypes.h
@@ -198,6 +198,10 @@ class CIRGenTypes {
   const CIRGenFunctionInfo &arrangeBuiltinFunctionCall(QualType resultType,
                                                        const CallArgList 
&args);
 
+  const CIRGenFunctionInfo &
+  arrangeBuiltinFunctionDeclaration(QualType resultType,
+                                    const FunctionArgList &args);
+
   /// Return whether a type can be zero-initialized (in the C++ sense) with an
   /// LLVM zeroinitializer.
   bool isZeroInitializable(clang::QualType ty);
diff --git a/clang/lib/CodeGen/CGCoroutine.cpp 
b/clang/lib/CodeGen/CGCoroutine.cpp
index 2f162519139e0d..60f6e2d60c9548 100644
--- a/clang/lib/CodeGen/CGCoroutine.cpp
+++ b/clang/lib/CodeGen/CGCoroutine.cpp
@@ -20,14 +20,14 @@
 using namespace clang;
 using namespace CodeGen;
 
-using llvm::Value;
 using llvm::BasicBlock;
+using llvm::Value;
 
 namespace {
 enum class AwaitKind { Init, Normal, Yield, Final };
 static constexpr llvm::StringLiteral AwaitKindStr[] = {"init", "await", 
"yield",
                                                        "final"};
-}
+} // namespace
 
 struct clang::CodeGen::CGCoroData {
   // What is the current await expression kind and how many
@@ -217,15 +217,15 @@ static bool StmtCanThrow(const Stmt *S) {
 //  See llvm's docs/Coroutines.md for more details.
 //
 namespace {
-  struct LValueOrRValue {
-    LValue LV;
-    RValue RV;
-  };
-}
-static LValueOrRValue emitSuspendExpression(CodeGenFunction &CGF, CGCoroData 
&Coro,
-                                    CoroutineSuspendExpr const &S,
-                                    AwaitKind Kind, AggValueSlot aggSlot,
-                                    bool ignoreResult, bool forLValue) {
+struct LValueOrRValue {
+  LValue LV;
+  RValue RV;
+};
+} // namespace
+static LValueOrRValue
+emitSuspendExpression(CodeGenFunction &CGF, CGCoroData &Coro,
+                      CoroutineSuspendExpr const &S, AwaitKind Kind,
+                      AggValueSlot aggSlot, bool ignoreResult, bool forLValue) 
{
   auto *E = S.getCommonExpr();
 
   auto CommonBinder =
@@ -380,13 +380,15 @@ RValue CodeGenFunction::EmitCoawaitExpr(const CoawaitExpr 
&E,
                                         bool ignoreResult) {
   return emitSuspendExpression(*this, *CurCoro.Data, E,
                                CurCoro.Data->CurrentAwaitKind, aggSlot,
-                               ignoreResult, /*forLValue*/false).RV;
+                               ignoreResult, /*forLValue*/ false)
+      .RV;
 }
 RValue CodeGenFunction::EmitCoyieldExpr(const CoyieldExpr &E,
                                         AggValueSlot aggSlot,
                                         bool ignoreResult) {
   return emitSuspendExpression(*this, *CurCoro.Data, E, AwaitKind::Yield,
-                               aggSlot, ignoreResult, /*forLValue*/false).RV;
+                               aggSlot, ignoreResult, /*forLValue*/ false)
+      .RV;
 }
 
 void CodeGenFunction::EmitCoreturnStmt(CoreturnStmt const &S) {
@@ -402,10 +404,10 @@ void CodeGenFunction::EmitCoreturnStmt(CoreturnStmt const 
&S) {
   EmitBranchThroughCleanup(CurCoro.Data->FinalJD);
 }
 
-
 #ifndef NDEBUG
-static QualType getCoroutineSuspendExprReturnType(const ASTContext &Ctx,
-  const CoroutineSuspendExpr *E) {
+static QualType
+getCoroutineSuspendExprReturnType(const ASTContext &Ctx,
+                                  const CoroutineSuspendExpr *E) {
   const auto *RE = E->getResumeExpr();
   // Is it possible for RE to be a CXXBindTemporaryExpr wrapping
   // a MemberCallExpr?
@@ -475,24 +477,27 @@ CodeGenFunction::generateAwaitSuspendWrapper(Twine const 
&CoroName,
   return Fn;
 }
 
-LValue
-CodeGenFunction::EmitCoawaitLValue(const CoawaitExpr *E) {
-  assert(getCoroutineSuspendExprReturnType(getContext(), E)->isReferenceType() 
&&
-         "Can't have a scalar return unless the return type is a "
-         "reference type!");
+LValue CodeGenFunction::EmitCoawaitLValue(const CoawaitExpr *E) {
+  assert(
+      getCoroutineSuspendExprReturnType(getContext(), E)->isReferenceType() &&
+      "Can't have a scalar return unless the return type is a "
+      "reference type!");
   return emitSuspendExpression(*this, *CurCoro.Data, *E,
-                               CurCoro.Data->CurrentAwaitKind, 
AggValueSlot::ignored(),
-                               /*ignoreResult*/false, /*forLValue*/true).LV;
+                               CurCoro.Data->CurrentAwaitKind,
+                               AggValueSlot::ignored(),
+                               /*ignoreResult*/ false, /*forLValue*/ true)
+      .LV;
 }
 
-LValue
-CodeGenFunction::EmitCoyieldLValue(const CoyieldExpr *E) {
-  assert(getCoroutineSuspendExprReturnType(getContext(), E)->isReferenceType() 
&&
-         "Can't have a scalar return unless the return type is a "
-         "reference type!");
-  return emitSuspendExpression(*this, *CurCoro.Data, *E,
-                               AwaitKind::Yield, AggValueSlot::ignored(),
-                               /*ignoreResult*/false, /*forLValue*/true).LV;
+LValue CodeGenFunction::EmitCoyieldLValue(const CoyieldExpr *E) {
+  assert(
+      getCoroutineSuspendExprReturnType(getContext(), E)->isReferenceType() &&
+      "Can't have a scalar return unless the return type is a "
+      "reference type!");
+  return emitSuspendExpression(*this, *CurCoro.Data, *E, AwaitKind::Yield,
+                               AggValueSlot::ignored(),
+                               /*ignoreResult*/ false, /*forLValue*/ true)
+      .LV;
 }
 
 // Hunts for the parameter reference in the parameter copy/move declaration.
@@ -512,51 +517,51 @@ struct GetParamRef : public StmtVisitor<GetParamRef> {
     }
   }
 };
-}
+} // namespace
 
 // This class replaces references to parameters to their copies by changing
 // the addresses in CGF.LocalDeclMap and restoring back the original values in
 // its destructor.
 
 namespace {
-  struct ParamReferenceReplacerRAII {
-    CodeGenFunction::DeclMapTy SavedLocals;
-    CodeGenFunction::DeclMapTy& LocalDeclMap;
-
-    ParamReferenceReplacerRAII(CodeGenFunction::DeclMapTy &LocalDeclMap)
-        : LocalDeclMap(LocalDeclMap) {}
-
-    void addCopy(DeclStmt const *PM) {
-      // Figure out what param it refers to.
-
-      assert(PM->isSingleDecl());
-      VarDecl const*VD = static_cast<VarDecl const*>(PM->getSingleDecl());
-      Expr const *InitExpr = VD->getInit();
-      GetParamRef Visitor;
-      Visitor.Visit(const_cast<Expr*>(InitExpr));
-      assert(Visitor.Expr);
-      DeclRefExpr *DREOrig = Visitor.Expr;
-      auto *PD = DREOrig->getDecl();
-
-      auto it = LocalDeclMap.find(PD);
-      assert(it != LocalDeclMap.end() && "parameter is not found");
-      SavedLocals.insert({ PD, it->second });
-
-      auto copyIt = LocalDeclMap.find(VD);
-      assert(copyIt != LocalDeclMap.end() && "parameter copy is not found");
-      it->second = copyIt->getSecond();
-    }
+struct ParamReferenceReplacerRAII {
+  CodeGenFunction::DeclMapTy SavedLocals;
+  CodeGenFunction::DeclMapTy &LocalDeclMap;
+
+  ParamReferenceReplacerRAII(CodeGenFunction::DeclMapTy &LocalDeclMap)
+      : LocalDeclMap(LocalDeclMap) {}
+
+  void addCopy(DeclStmt const *PM) {
+    // Figure out what param it refers to.
+
+    assert(PM->isSingleDecl());
+    VarDecl const *VD = static_cast<VarDecl const *>(PM->getSingleDecl());
+    Expr const *InitExpr = VD->getInit();
+    GetParamRef Visitor;
+    Visitor.Visit(const_cast<Expr *>(InitExpr));
+    assert(Visitor.Expr);
+    DeclRefExpr *DREOrig = Visitor.Expr;
+    auto *PD = DREOrig->getDecl();
+
+    auto it = LocalDeclMap.find(PD);
+    assert(it != LocalDeclMap.end() && "parameter is not found");
+    SavedLocals.insert({PD, it->second});
+
+    auto copyIt = LocalDeclMap.find(VD);
+    assert(copyIt != LocalDeclMap.end() && "parameter copy is not found");
+    it->second = copyIt->getSecond();
+  }
 
-    ~ParamReferenceReplacerRAII() {
-      for (auto&& SavedLocal : SavedLocals) {
-        LocalDeclMap.insert({SavedLocal.first, SavedLocal.second});
-      }
+  ~ParamReferenceReplacerRAII() {
+    for (auto &&SavedLocal : SavedLocals) {
+      LocalDeclMap.insert({SavedLocal.first, SavedLocal.second});
     }
-  };
-}
+  }
+};
+} // namespace
 
-// For WinEH exception representation backend needs to know what funclet 
coro.end
-// belongs to. That information is passed in a funclet bundle.
+// For WinEH exception representation backend needs to know what funclet
+// coro.end belongs to. That information is passed in a funclet bundle.
 static SmallVector<llvm::OperandBundleDef, 1>
 getBundlesForCoroEnd(CodeGenFunction &CGF) {
   SmallVector<llvm::OperandBundleDef, 1> BundleList;
@@ -595,7 +600,7 @@ struct CallCoroEnd final : public EHScopeStack::Cleanup {
     }
   }
 };
-}
+} // namespace
 
 namespace {
 // Make sure to call coro.delete on scope exit.
@@ -649,7 +654,7 @@ struct CallCoroDelete final : public EHScopeStack::Cleanup {
   }
   explicit CallCoroDelete(Stmt *DeallocStmt) : Deallocate(DeallocStmt) {}
 };
-}
+} // namespace
 
 namespace {
 struct GetReturnObjectManager {
@@ -956,8 +961,7 @@ void CodeGenFunction::EmitCoroutineBody(const 
CoroutineBodyStmt &S) {
     // If not, return OnAllocFailure object.
     EmitBlock(RetOnFailureBB);
     EmitStmt(RetOnAllocFailure);
-  }
-  else {
+  } else {
     Builder.CreateBr(InitBB);
   }
 
@@ -1061,8 +1065,7 @@ void CodeGenFunction::EmitCoroutineBody(const 
CoroutineBodyStmt &S) {
 
       if (ContBB)
         EmitBlock(ContBB);
-    }
-    else...
[truncated]

``````````

</details>


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

Reply via email to