support for record extensions when using -O gen-standalone-C++

This commit is contained in:
Vern Paxson 2025-01-09 16:11:37 -08:00 committed by Arne Welzel
parent 300b3788e2
commit 960931ba5c
7 changed files with 64 additions and 9 deletions

View file

@ -644,11 +644,15 @@ private:
class RecordTypeInfo : public AbstractTypeInfo {
public:
RecordTypeInfo(CPPCompile* c, TypePtr _t);
RecordTypeInfo(CPPCompile* c, TypePtr _t, int _addl_fields);
void AddInitializerVals(std::vector<std::string>& ivs) const override;
private:
// If non-zero, where additional fields begin. Only used for standalone
// compilation.
int addl_fields;
std::vector<std::string> field_names;
std::vector<TypePtr> field_types;
std::vector<int> field_attrs;