[llvm] [Coroutines] Remove assert about a promise being present (PR #156007)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 04:28:08 PDT 2025


================
@@ -700,9 +700,6 @@ static void buildFrameDebugInfo(Function &F, coro::Shape &Shape,
 
   DIBuilder DBuilder(*F.getParent(), /*AllowUnresolved*/ false);
 
-  assert(Shape.getPromiseAlloca() &&
-         "Coroutine with switch ABI should own Promise alloca");
-
----------------
yonillasky wrote:

Another possibility is to add some new kind of MD that indicates the coroutine was directly generated at the IR level (in which case, we allow the promise not to exist). Then, we can leave this `assert` intact for regular C++ coroutines.


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


More information about the llvm-commits mailing list