|
@@ -158,6 +158,7 @@ interface
|
|
|
function getmangledparaname:TSymStr;override;
|
|
|
function size:asizeint;override;
|
|
|
procedure setsize;
|
|
|
+ function alignment: shortint; override;
|
|
|
end;
|
|
|
tfiledefclass = class of tfiledef;
|
|
|
|
|
@@ -956,6 +957,7 @@ interface
|
|
|
procedure deref;override;
|
|
|
function GetTypeName:string;override;
|
|
|
function is_publishable : boolean;override;
|
|
|
+ function alignment: shortint; override;
|
|
|
end;
|
|
|
tsetdefclass = class of tsetdef;
|
|
|
|
|
@@ -3212,6 +3214,20 @@ implementation
|
|
|
end;
|
|
|
|
|
|
|
|
|
+ function tfiledef.alignment: shortint;
|
|
|
+ begin
|
|
|
+ case filetyp of
|
|
|
+ ft_text:
|
|
|
+ result:=search_system_type('TEXTREC').typedef.alignment;
|
|
|
+ ft_typed,
|
|
|
+ ft_untyped:
|
|
|
+ result:=search_system_type('FILEREC').typedef.alignment;
|
|
|
+ else
|
|
|
+ internalerror(2018120101);
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
+
|
|
|
procedure tfiledef.ppuwrite(ppufile:tcompilerppufile);
|
|
|
begin
|
|
|
inherited ppuwrite(ppufile);
|
|
@@ -3665,6 +3681,13 @@ implementation
|
|
|
is_publishable:=savesize in [1,2,4];
|
|
|
end;
|
|
|
|
|
|
+ function tsetdef.alignment: shortint;
|
|
|
+ begin
|
|
|
+ Result:=inherited;
|
|
|
+ if result>sizeof(aint) then
|
|
|
+ result:=sizeof(aint);
|
|
|
+ end;
|
|
|
+
|
|
|
|
|
|
function tsetdef.GetTypeName : string;
|
|
|
begin
|