Explorar el Código

* fixed field alignment when reusing an anonymous recorddef for LLVM and
the LLVM layout of an instance does not match the original one
(e.g. because it contains procdefs of procedures with different
signatures)

git-svn-id: trunk@42477 -

Jonas Maebe hace 6 años
padre
commit
e7fbebfef5
Se han modificado 1 ficheros con 6 adiciones y 3 borrados
  1. 6 3
      compiler/llvm/nllvmtcon.pas

+ 6 - 3
compiler/llvm/nllvmtcon.pas

@@ -388,9 +388,12 @@ implementation
               newdef:=crecorddef.create_global_internal('',1,1);
             recorddef,
             objectdef:
-              newdef:=crecorddef.create_global_internal('',
-                tabstractrecordsymtable(tabstractrecorddef(info.def).symtable).recordalignment,
-                tabstractrecordsymtable(tabstractrecorddef(info.def).symtable).recordalignmin);
+              begin
+                newdef:=crecorddef.create_global_internal('',
+                  tabstractrecordsymtable(tabstractrecorddef(info.def).symtable).usefieldalignment,
+                  tabstractrecordsymtable(tabstractrecorddef(info.def).symtable).recordalignmin);
+                tabstractrecordsymtable(newdef.symtable).recordalignment:=tabstractrecordsymtable(tabstractrecorddef(info.def).symtable).recordalignment;
+              end
             else
               internalerror(2015122401);
           end;