[PATCH] D25377: [coroutines] Store an address of destroy OR cleanup part in the coroutine frame.

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 16:53:40 PDT 2016


GorNishanov marked an inline comment as done.
GorNishanov added inline comments.


================
Comment at: lib/Transforms/Coroutines/CoroInstr.h:86-87
       if (auto *II = dyn_cast<IntrinsicInst>(U))
         if (II->getIntrinsicID() == Intrinsic::coro_alloc)
-          return II;
+          return cast<CoroAllocInst>(II);
     return nullptr;
----------------
majnemer wrote:
> Couldn't you do:
>   if (auto *CA = dyn_cast<CoroAllocInst>(II))
>     return CA;
I can and I will!

:)

Thank you for the review!


https://reviews.llvm.org/D25377





More information about the llvm-commits mailing list