SemaCoroutine: Add allocation / deallocation substatements.
CGCoroutine/Test: Emit allocation and deallocation + test.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Sema/SemaCoroutine.cpp | ||
|---|---|---|
| 165 ↗ | (On Diff #75464) | id does not fllow LLVM coding rules. Must be Id |
| 169 ↗ | (On Diff #75464) | true argument must have adjacent comment with the name of the parameter, like /*Param=*/true |
| 171 ↗ | (On Diff #75464) | auto *BuiltInDecl |
| 174–175 ↗ | (On Diff #75464) | I believe you can drop the last nullptr arg, it is defaulted. And I think it's better to make it VK_LValue |
| 409 ↗ | (On Diff #75464) | auto *PointeeRD |
| 472–473 ↗ | (On Diff #75464) | The last nullptr can be dropped |
| 481 ↗ | (On Diff #75464) | OpDeleteQualType |
| 494 ↗ | (On Diff #75464) | const auto *OpDeleteType |
| 496–498 ↗ | (On Diff #75464) | No need for braces in one-line substatement |
| 501 ↗ | (On Diff #75464) | Drop last nullptr |
Comment Actions
LGTM with minor changes.
| lib/CodeGen/CGCoroutine.cpp | ||
|---|---|---|
| 71–72 ↗ | (On Diff #75946) | 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. |
| lib/Sema/SemaCoroutine.cpp | ||
| 422 ↗ | (On Diff #75946) | This should be outside the if. |
| lib/CodeGen/CGCoroutine.cpp | ||
|---|---|---|
| 71–72 ↗ | (On Diff #75946) | Yep. You are right! I took it out and made createCoroData return void, since nobody cares about its result anymore. |