Browse Source

* initialise the llvmvalueloc field for LOC_VOID locations, so they don't
get randomly passed as either byval or not (while they don't contain any
data and hence this can't cause bugs in the generated code, it can cause
signature mismatches in llvm)

git-svn-id: trunk@34956 -

Jonas Maebe 8 years ago
parent
commit
d39db60934
1 changed files with 5 additions and 1 deletions
  1. 5 1
      compiler/llvm/llvmpara.pas

+ 5 - 1
compiler/llvm/llvmpara.pas

@@ -134,7 +134,11 @@ unit llvmpara;
                     paraloc^.llvmvalueloc:=true;
                     paraloc^.llvmvalueloc:=true;
                   end;
                   end;
                 LOC_VOID:
                 LOC_VOID:
-                  ;
+                  begin
+                    { for empty records, ensure these don't get a byval
+                      attribute }
+                    paraloc^.llvmvalueloc:=true;
+                  end;
                 else
                 else
                   internalerror(2014012302);
                   internalerror(2014012302);
               end;
               end;