| 42 | //----------------------------------------------------------------------------- |
| 43 | |
| 44 | CoroutinesCodeGenerator::~CoroutinesCodeGenerator() |
| 45 | { |
| 46 | RETURN_IF(not(mASTData.mFrameType and mASTData.mDoInsertInDtor)); |
| 47 | |
| 48 | mASTData.mFrameType->completeDefinition(); |
| 49 | |
| 50 | OutputFormatHelper ofm{}; |
| 51 | |
| 52 | // Using the "normal" CodeGenerator here as this is only about inserting the made up coroutine-frame. |
| 53 | CodeGeneratorVariant codeGenerator{ofm}; |
| 54 | codeGenerator->InsertArg(mASTData.mFrameType); |
| 55 | |
| 56 | // Insert the made-up struct before the function declaration |
| 57 | mOutputFormatHelper.InsertAt(mPosBeforeFunc, ofm); |
| 58 | } |
| 59 | //----------------------------------------------------------------------------- |
| 60 | |
| 61 | static FieldDecl* AddField(CoroutineASTData& astData, std::string_view name, QualType type) |