From e90af5d7c02dc07b93a69b57842ad0935b84b0da Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 22 Nov 2015 11:49:28 +0000 Subject: [PATCH] * fixed collection of types from tai_*typedconst git-svn-id: trunk@32469 - --- compiler/llvm/llvmtype.pas | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/compiler/llvm/llvmtype.pas b/compiler/llvm/llvmtype.pas index e24aa90d8c..d97a2852bb 100644 --- a/compiler/llvm/llvmtype.pas +++ b/compiler/llvm/llvmtype.pas @@ -116,6 +116,7 @@ implementation var res: PHashSetItem; begin + record_def(def); res:=asmsymtypes.FindOrAdd(@sym,sizeof(sym)); { due to internal aliases with different signatures, we may end up with multiple defs for the same symbol -> use the one from the declaration, @@ -209,23 +210,32 @@ implementation procedure TLLVMTypeInfo.collect_tai_info(deftypelist: tasmlist; p: tai); + var + value: tai_abstracttypedconst; begin case p.typ of ait_llvmalias: begin - record_def(taillvmalias(p).def); record_asmsym_def(taillvmalias(p).newsym,taillvmalias(p).def,true); end; ait_llvmdecl: begin - record_def(taillvmdecl(p).def); record_asmsym_def(taillvmdecl(p).namesym,taillvmdecl(p).def,true); collect_asmlist_info(deftypelist,taillvmdecl(p).initdata); end; ait_llvmins: collect_llvmins_info(deftypelist,taillvm(p)); ait_typedconst: - record_def(tai_abstracttypedconst(p).def); + begin + record_def(tai_abstracttypedconst(p).def); + case tai_abstracttypedconst(p).adetyp of + tck_simple: + collect_tai_info(deftypelist,tai_simpletypedconst(p).val); + tck_array,tck_record: + for value in tai_aggregatetypedconst(p) do + collect_tai_info(deftypelist,value); + end; + end; end; end;