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