mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 22:29:20 +02:00
* handle cdecl varargs parameters in llvm procdef string representations
git-svn-id: branches/hlcgllvm@28355 -
This commit is contained in:
parent
9225d43ccf
commit
bae1f72896
@ -519,6 +519,16 @@ implementation
|
|||||||
signext: tllvmvalueextension;
|
signext: tllvmvalueextension;
|
||||||
usedef: tdef;
|
usedef: tdef;
|
||||||
begin
|
begin
|
||||||
|
if (proccalloption in cdecl_pocalls) and
|
||||||
|
is_array_of_const(hp.vardef) then
|
||||||
|
begin
|
||||||
|
if not first then
|
||||||
|
encodedstr:=encodedstr+', '
|
||||||
|
else
|
||||||
|
first:=false;
|
||||||
|
encodedstr:=encodedstr+'...';
|
||||||
|
exit
|
||||||
|
end;
|
||||||
paraloc:=hp.paraloc[calleeside].location;
|
paraloc:=hp.paraloc[calleeside].location;
|
||||||
repeat
|
repeat
|
||||||
usedef:=paraloc^.def;
|
usedef:=paraloc^.def;
|
||||||
@ -600,6 +610,12 @@ implementation
|
|||||||
hp:=tparavarsym(def.paras[paranr]);
|
hp:=tparavarsym(def.paras[paranr]);
|
||||||
llvmaddencodedparaloctype(hp,def.proccalloption,pddecltype in [lpd_decl],first,encodedstr);
|
llvmaddencodedparaloctype(hp,def.proccalloption,pddecltype in [lpd_decl],first,encodedstr);
|
||||||
end;
|
end;
|
||||||
|
if po_varargs in def.procoptions then
|
||||||
|
begin
|
||||||
|
if not first then
|
||||||
|
encodedstr:=encodedstr+', ';
|
||||||
|
encodedstr:=encodedstr+'...';
|
||||||
|
end;
|
||||||
encodedstr:=encodedstr+')'
|
encodedstr:=encodedstr+')'
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user