mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 19:29:39 +02:00
* always search in the current module as well as its symtables are be popped already in case of RTTI generation
git-svn-id: trunk@39688 -
This commit is contained in:
parent
190716ac0e
commit
ecc02f3fdb
@ -1335,12 +1335,21 @@ implementation
|
|||||||
srsym: tsym;
|
srsym: tsym;
|
||||||
srsymtable: tsymtable;
|
srsymtable: tsymtable;
|
||||||
i: longint;
|
i: longint;
|
||||||
|
name : TIDString;
|
||||||
begin
|
begin
|
||||||
if searchsym_type(copy(internaltypeprefixName[prefix],2,length(internaltypeprefixName[prefix])),srsym,srsymtable) then
|
name:=copy(internaltypeprefixName[prefix],2,length(internaltypeprefixName[prefix]));
|
||||||
|
if searchsym_type(name,srsym,srsymtable) then
|
||||||
begin
|
begin
|
||||||
result:=trecorddef(ttypesym(srsym).typedef);
|
result:=trecorddef(ttypesym(srsym).typedef);
|
||||||
exit
|
exit
|
||||||
end;
|
end;
|
||||||
|
{ also always search in the current module (symtables are popped for
|
||||||
|
RTTI related code already) }
|
||||||
|
if searchsym_in_module(pointer(current_module),name,srsym,srsymtable) then
|
||||||
|
begin
|
||||||
|
result:=trecorddef(ttypesym(srsym).typedef);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
fieldlist:=tfplist.create;
|
fieldlist:=tfplist.create;
|
||||||
for i:=low(fields) to high(fields) do
|
for i:=low(fields) to high(fields) do
|
||||||
fieldlist.add(fields[i]);
|
fieldlist.add(fields[i]);
|
||||||
@ -1368,6 +1377,14 @@ implementation
|
|||||||
arrdef:=tarraydef(trecordsymtable(recdef.symtable).findfieldbyoffset(countdef.size).vardef);
|
arrdef:=tarraydef(trecordsymtable(recdef.symtable).findfieldbyoffset(countdef.size).vardef);
|
||||||
exit
|
exit
|
||||||
end;
|
end;
|
||||||
|
{ also always search in the current module (symtables are popped for
|
||||||
|
RTTI related code already) }
|
||||||
|
if searchsym_in_module(pointer(current_module),copy(name,2,length(name)),srsym,srsymtable) then
|
||||||
|
begin
|
||||||
|
recdef:=trecorddef(ttypesym(srsym).typedef);
|
||||||
|
arrdef:=tarraydef(trecordsymtable(recdef.symtable).findfieldbyoffset(countdef.size).vardef);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
recdef:=crecorddef.create_global_internal(name,packrecords,
|
recdef:=crecorddef.create_global_internal(name,packrecords,
|
||||||
targetinfos[target_info.system]^.alignment.recordalignmin,
|
targetinfos[target_info.system]^.alignment.recordalignmin,
|
||||||
targetinfos[target_info.system]^.alignment.maxCrecordalign);
|
targetinfos[target_info.system]^.alignment.maxCrecordalign);
|
||||||
|
Loading…
Reference in New Issue
Block a user