* only create a new procsym for a specialization if it's indeed needed

git-svn-id: trunk@35013 -
This commit is contained in:
svenbarth 2016-11-29 14:13:06 +00:00
parent ebfeb5b62a
commit 0a1e080089

View File

@ -938,7 +938,10 @@ uses
{ First a new sym so we can reuse this specialization and { First a new sym so we can reuse this specialization and
references to this specialization can be handled } references to this specialization can be handled }
if genericdef.typ=procdef then if genericdef.typ=procdef then
srsym:=cprocsym.create(finalspecializename) if assigned(psym) then
srsym:=psym
else
srsym:=cprocsym.create(finalspecializename)
else else
srsym:=ctypesym.create(finalspecializename,generrordef,true); srsym:=ctypesym.create(finalspecializename,generrordef,true);
{ insert the symbol only if we don't know already that we have { insert the symbol only if we don't know already that we have