* discard type conversions from/to generic defs for llvm as well

git-svn-id: trunk@38864 -
This commit is contained in:
Jonas Maebe 2018-04-28 16:17:45 +00:00
parent eaafb166ad
commit 8da8b956b0

View File

@ -2439,7 +2439,13 @@ implementation
{$ifdef llvm}
{ we still may have to insert a type conversion at the
llvm level }
if left.resultdef<>resultdef then
if (left.resultdef<>resultdef) and
{ if unspecialised generic -> we won't generate any code
for this, and keeping the type conversion node will
cause valid_for_assign to fail because the typecast will be from/to something of 0
bytes to/from something with a non-zero size }
not is_typeparam(left.resultdef) and
not is_typeparam(resultdef) then
result:=nil
else
{$endif llvm}