瀏覽代碼

* made the fields array parameter of llvmgettemprecorddef "const", as it
doesn't get modified and hence doesn't need to be copied

git-svn-id: trunk@42103 -

Jonas Maebe 6 年之前
父節點
當前提交
a418dc6c91
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/llvm/llvmdef.pas

+ 2 - 2
compiler/llvm/llvmdef.pas

@@ -68,7 +68,7 @@ interface
       record consisting of 4 longints must be returned as a record consisting of
       two int64's on x86-64. This function is used to create (and reuse)
       temporary recorddefs for such purposes.}
-    function llvmgettemprecorddef(fieldtypes: array of tdef; packrecords, recordalignmin, maxcrecordalign: shortint): trecorddef;
+    function llvmgettemprecorddef(const fieldtypes: array of tdef; packrecords, recordalignmin, maxcrecordalign: shortint): trecorddef;
 
     { get the llvm type corresponding to a parameter, e.g. a record containing
       two integer int64 for an arbitrary record split over two individual int64
@@ -855,7 +855,7 @@ implementation
       end;
 
 
-    function llvmgettemprecorddef(fieldtypes: array of tdef; packrecords, recordalignmin, maxcrecordalign: shortint): trecorddef;
+    function llvmgettemprecorddef(const fieldtypes: array of tdef; packrecords, recordalignmin, maxcrecordalign: shortint): trecorddef;
       var
         i: longint;
         res: PHashSetItem;