mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 20:30:23 +02:00
LLVM: don't use type names in ctor/dtor arrays
Workaround for https://github.com/llvm/llvm-project/issues/56809
This commit is contained in:
parent
0e46041717
commit
839849085b
@ -502,7 +502,8 @@ implementation
|
||||
recorddef :
|
||||
begin
|
||||
{ avoid endlessly recursive definitions }
|
||||
if not(lef_typedecl in flags) then
|
||||
if not(lef_typedecl in flags) and
|
||||
not(df_llvm_no_typename in def.defoptions) then
|
||||
encodedstr:=encodedstr+llvmtypeidentifier(def)
|
||||
else
|
||||
llvmaddencodedabstractrecordtype(trecorddef(def),encodedstr);
|
||||
|
@ -180,6 +180,7 @@ implementation
|
||||
itemdef:=llvmgettemprecorddef(fields,C_alignment,
|
||||
targetinfos[target_info.system]^.alignment.recordalignmin);
|
||||
include(itemdef.defoptions,df_llvm_no_struct_packing);
|
||||
include(itemdef.defoptions,df_llvm_no_typename);
|
||||
tcb:=ctai_typedconstbuilder.create([tcalo_new_section]);
|
||||
tllvmtai_typedconstbuilder(tcb).appendingdef:=true;
|
||||
arraydef:=carraydef.getreusable(itemdef,procdefs.Count);
|
||||
|
@ -251,7 +251,9 @@ type
|
||||
df_has_global_ref,
|
||||
{ the def was derived with generic type or const fields so the size
|
||||
of the def can not be determined }
|
||||
df_has_generic_fields
|
||||
df_has_generic_fields,
|
||||
{ never use the typename for this type, always expand full definition }
|
||||
df_llvm_no_typename
|
||||
);
|
||||
tdefoptions=set of tdefoption;
|
||||
|
||||
|
@ -2800,7 +2800,8 @@ const
|
||||
(mask:df_llvm_no_struct_packing; str:'LLVM unpacked struct'),
|
||||
(mask:df_internal; str:'Internal'),
|
||||
(mask:df_has_global_ref; str:'Has Global Ref'),
|
||||
(mask:df_has_generic_fields; str:'Has generic fields')
|
||||
(mask:df_has_generic_fields; str:'Has generic fields'),
|
||||
(mask:df_llvm_no_typename; str:'LLVM no typename')
|
||||
);
|
||||
defstate : array[1..ord(high(tdefstate))] of tdefstateinfo=(
|
||||
(mask:ds_vmt_written; str:'VMT Written'),
|
||||
|
Loading…
Reference in New Issue
Block a user