* specify the "byval" attribute also at the caller side

git-svn-id: trunk@34301 -
This commit is contained in:
Jonas Maebe 2016-08-13 14:47:39 +00:00
parent f0bf3b364a
commit 819f0c39fa
3 changed files with 6 additions and 0 deletions

View File

@ -184,6 +184,7 @@ interface
tllvmcallpara = record
def: tdef;
valueext: tllvmvalueextension;
byval: boolean;
case loc: tcgloc of
LOC_REFERENCE,
LOC_REGISTER,

View File

@ -244,6 +244,8 @@ implementation
result:=result+llvmencodetypename(para^.def);
if para^.valueext<>lve_none then
result:=result+llvmvalueextension2str[para^.valueext];
if para^.byval then
result:=result+' byval';
case para^.loc of
LOC_REGISTER,
LOC_FPUREGISTER,

View File

@ -440,6 +440,9 @@ implementation
begin
new(callpara);
callpara^.def:=paraloc^.def;
{ if the paraloc doesn't contain the value itself, it's a byval
parameter }
callpara^.byval:=not paraloc^.llvmvalueloc;
llvmextractvalueextinfo(paras[i]^.def, callpara^.def, callpara^.valueext);
if paraloc^.llvmloc.loc=LOC_CONSTANT then
begin