Procházet zdrojové kódy

* llvm: only set custom parameter alignments for byval parameters, the rest
is handled automatically by llvm (and since llvm 11.0 you get an error if
you specify an alignment for them anyway)

git-svn-id: trunk@48100 -

Jonas Maebe před 4 roky
rodič
revize
80282d6eff
1 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 5 4
      compiler/llvm/hlcgllvm.pas

+ 5 - 4
compiler/llvm/hlcgllvm.pas

@@ -477,10 +477,6 @@ implementation
           begin
             new(callpara);
             callpara^.def:=paraloc^.def;
-            if firstparaloc then
-              callpara^.alignment:=paras[i]^.Alignment
-            else
-              callpara^.alignment:=std_param_align;
             { if the paraloc doesn't contain the value itself, it's a byval
               parameter }
             if paraloc^.retvalloc then
@@ -493,6 +489,11 @@ implementation
                 callpara^.sret:=false;
                 callpara^.byval:=not paraloc^.llvmvalueloc;
               end;
+            if firstparaloc and
+               callpara^.byval then
+              callpara^.alignment:=paras[i]^.Alignment
+            else
+              callpara^.alignment:=std_param_align;
             llvmextractvalueextinfo(paras[i]^.def, callpara^.def, callpara^.valueext);
             case paraloc^.llvmloc.loc of
               LOC_CONSTANT: