2
0
Эх сурвалжийг харах

* fixed writing of procvardef records (they're also written as tck_record)

git-svn-id: trunk@32298 -
Jonas Maebe 9 жил өмнө
parent
commit
1675c27e59

+ 4 - 2
compiler/llvm/agllvm.pas

@@ -745,7 +745,8 @@ implementation
               begin
               begin
                 writer.AsmWrite(defstr);
                 writer.AsmWrite(defstr);
                 writer.AsmWrite(' ');
                 writer.AsmWrite(' ');
-                if tabstractrecordsymtable(tabstractrecorddef(hp.def).symtable).usefieldalignment<>C_alignment then
+                if (hp.def.typ in [objectdef,recorddef]) and
+                   (tabstractrecordsymtable(tabstractrecorddef(hp.def).symtable).usefieldalignment<>C_alignment) then
                   writer.AsmWrite('<{')
                   writer.AsmWrite('<{')
                 else
                 else
                   writer.AsmWrite('{');
                   writer.AsmWrite('{');
@@ -758,7 +759,8 @@ implementation
                       first:=false;
                       first:=false;
                     WriteTypedConstData(p);
                     WriteTypedConstData(p);
                   end;
                   end;
-                if tabstractrecordsymtable(tabstractrecorddef(hp.def).symtable).usefieldalignment<>C_alignment then
+                if (hp.def.typ in [recorddef,objectdef]) and
+                   (tabstractrecordsymtable(tabstractrecorddef(hp.def).symtable).usefieldalignment<>C_alignment) then
                   writer.AsmWrite('}>')
                   writer.AsmWrite('}>')
                 else
                 else
                   writer.AsmWrite('}');
                   writer.AsmWrite('}');