mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-05 00:29:37 +01:00
* specify the "byval" attribute also at the caller side
git-svn-id: trunk@34301 -
This commit is contained in:
parent
f0bf3b364a
commit
819f0c39fa
@ -184,6 +184,7 @@ interface
|
|||||||
tllvmcallpara = record
|
tllvmcallpara = record
|
||||||
def: tdef;
|
def: tdef;
|
||||||
valueext: tllvmvalueextension;
|
valueext: tllvmvalueextension;
|
||||||
|
byval: boolean;
|
||||||
case loc: tcgloc of
|
case loc: tcgloc of
|
||||||
LOC_REFERENCE,
|
LOC_REFERENCE,
|
||||||
LOC_REGISTER,
|
LOC_REGISTER,
|
||||||
|
|||||||
@ -244,6 +244,8 @@ implementation
|
|||||||
result:=result+llvmencodetypename(para^.def);
|
result:=result+llvmencodetypename(para^.def);
|
||||||
if para^.valueext<>lve_none then
|
if para^.valueext<>lve_none then
|
||||||
result:=result+llvmvalueextension2str[para^.valueext];
|
result:=result+llvmvalueextension2str[para^.valueext];
|
||||||
|
if para^.byval then
|
||||||
|
result:=result+' byval';
|
||||||
case para^.loc of
|
case para^.loc of
|
||||||
LOC_REGISTER,
|
LOC_REGISTER,
|
||||||
LOC_FPUREGISTER,
|
LOC_FPUREGISTER,
|
||||||
|
|||||||
@ -440,6 +440,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
new(callpara);
|
new(callpara);
|
||||||
callpara^.def:=paraloc^.def;
|
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);
|
llvmextractvalueextinfo(paras[i]^.def, callpara^.def, callpara^.valueext);
|
||||||
if paraloc^.llvmloc.loc=LOC_CONSTANT then
|
if paraloc^.llvmloc.loc=LOC_CONSTANT then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user