* fixed tprocvardef.size() for

a) C-blocks: they are equivalent to a voidpointertype, as they are
      implicit pointer types
   b) procvardefs created from static class methods (there is no
      self pointer in this case)
  o fixes webtbs/tw30936.pp with LLVM

git-svn-id: trunk@34977 -
This commit is contained in:
Jonas Maebe 2016-11-26 21:51:21 +00:00
parent b2e99da3e6
commit 477283031c

View File

@ -6386,9 +6386,13 @@ implementation
function tprocvardef.size : asizeint;
begin
if ((po_methodpointer in procoptions) or
is_nested_pd(self)) and
not(po_addressonly in procoptions) then
{ we return false for is_addressonly for a block (because it's not a
simple pointer to a function), but they are handled as implicit
pointers to a datastructure that contains everything ->
voidpointertype.size instead of voidcodepointertype.size }
if po_is_block in procoptions then
size:=voidpointertype.size
else if not is_addressonly then
begin
if is_nested_pd(self) then
size:=voidcodepointertype.size+parentfpvoidpointertype.size