浏览代码

* take variant alignment from TVARDATA, should resolve #38022

git-svn-id: trunk@47286 -
florian 4 年之前
父节点
当前提交
d5e20fa6a9
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      compiler/symdef.pas

+ 7 - 0
compiler/symdef.pas

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