Browse Source

* take variant alignment from TVARDATA, should resolve #38022

git-svn-id: trunk@47286 -
florian 4 years ago
parent
commit
d5e20fa6a9
1 changed files with 7 additions and 0 deletions
  1. 7 0
      compiler/symdef.pas

+ 7 - 0
compiler/symdef.pas

@@ -217,6 +217,7 @@ interface
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           function getcopy : tstoreddef;override;
           function getcopy : tstoreddef;override;
           function GetTypeName:string;override;
           function GetTypeName:string;override;
+          function alignment : shortint;override;
           { do not override this routine in platform-specific subclasses,
           { do not override this routine in platform-specific subclasses,
             override ppuwrite_platform instead }
             override ppuwrite_platform instead }
           procedure ppuwrite(ppufile:tcompilerppufile);override;final;
           procedure ppuwrite(ppufile:tcompilerppufile);override;final;
@@ -3659,6 +3660,12 @@ implementation
       end;
       end;
 
 
 
 
+    function tvariantdef.alignment: shortint;
+      begin
+        result:=search_system_type('TVARDATA').typedef.alignment;
+      end;
+
+
     procedure tvariantdef.ppuwrite(ppufile:tcompilerppufile);
     procedure tvariantdef.ppuwrite(ppufile:tcompilerppufile);
       begin
       begin
          inherited ppuwrite(ppufile);
          inherited ppuwrite(ppufile);