* when emitting the procedure address part of a complex procvar, type

that address as an "address-only" procvar instead of supposedly
    emitting a complex procvar itself as the address part of that same
    complex procvar type (part of fixing test/tmaclocalprocparam4e.pp
    for llvm)

git-svn-id: trunk@34117 -
This commit is contained in:
Jonas Maebe 2016-07-14 15:18:01 +00:00
parent cdfe299f23
commit c71bc54785

View File

@ -1307,7 +1307,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
procedure tasmlisttypedconstbuilder.parse_procvardef(def:tprocvardef);
var
tmpn,n : tnode;
pd : tprocdef;
pd : tprocdef;
procaddrdef: tprocvardef;
havepd,
haveblock: boolean;
begin
@ -1349,7 +1350,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
{ in case of a nested procdef initialised with a global routine }
ftcb.maybe_begin_aggregate(def);
{ to handle type conversions }
ftcb.queue_init(def);
procaddrdef:=cprocvardef.getreusableprocaddr(def);
ftcb.queue_init(procaddrdef);
{ remove typeconvs, that will normally insert a lea
instruction which is not necessary for us }
while n.nodetype=typeconvn do
@ -1403,7 +1405,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
end
else if n.nodetype=pointerconstn then
begin
ftcb.queue_emit_ordconst(tpointerconstnode(n).value,def);
ftcb.queue_emit_ordconst(tpointerconstnode(n).value,procaddrdef);
if not def.is_addressonly then
ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
end