[PATCH] D25377: [coroutines] Store an address of destroy OR cleanup part in the coroutine frame.
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 16:30:39 PDT 2016
majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM
================
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;
----------------
Couldn't you do:
if (auto *CA = dyn_cast<CoroAllocInst>(II))
return CA;
https://reviews.llvm.org/D25377
More information about the llvm-commits
mailing list