[PATCH] D25879: [coroutines] Add allocation and deallocation substatements.
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 00:22:49 PDT 2016
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
LGTM with minor changes.
================
Comment at: lib/CodeGen/CGCoroutine.cpp:71-72
+ if (!createCoroData(*this, CurCoro, CoroId, nullptr)) {
+ // User inserted __builtin_coro_id by hand. Should not try to emit anything.
+ return;
+ }
----------------
Can this really happen? The `CoroutineBodyStmt` should be the first thing we emitted into a new function, so it seems like we shouldn't have pre-existing coro data yet.
================
Comment at: lib/Sema/SemaCoroutine.cpp:422
+
+ S.MarkFunctionReferenced(Loc, OperatorDelete);
+ }
----------------
This should be outside the `if`.
https://reviews.llvm.org/D25879
More information about the llvm-commits
mailing list