| 40 | //----------------------------------------------------------------------------- |
| 41 | |
| 42 | CfrontCodeGenerator::CfrontVtableData::CfrontVtableData() |
| 43 | : vptpTypedef{Typedef("__vptp"sv, Function("vptp"sv, GetGlobalAST().IntTy, {})->getType())} |
| 44 | , vtableRecorDecl{} |
| 45 | { |
| 46 | vtableRecorDecl = Struct("__mptr"sv); |
| 47 | auto AddField = [&](FieldDecl* field) { vtableRecorDecl->addDecl(field); }; |
| 48 | |
| 49 | d = mkFieldDecl(vtableRecorDecl, "d"sv, GetGlobalAST().ShortTy); |
| 50 | AddField(d); |
| 51 | AddField(mkFieldDecl(vtableRecorDecl, "i"sv, GetGlobalAST().ShortTy)); |
| 52 | f = mkFieldDecl(vtableRecorDecl, "f"sv, vptpTypedef); |
| 53 | AddField(f); |
| 54 | |
| 55 | vtableRecorDecl->completeDefinition(); |
| 56 | |
| 57 | vtableRecordType = QualType{vtableRecorDecl->getTypeForDecl(), 0u}; |
| 58 | } |
| 59 | //----------------------------------------------------------------------------- |
| 60 | |
| 61 | VarDecl* CfrontCodeGenerator::CfrontVtableData::VtblArrayVar(int size) |
nothing calls this directly
no test coverage detected