Compare commits

..

1 Commits

Author SHA1 Message Date
6673599486 Compile the compiler
All checks were successful
CI / ci (Release, ubuntu-latest) (pull_request) Successful in 5m55s
CI / ci (RelWithDebInfo, ubuntu-latest) (pull_request) Successful in 5m58s
CI / ci (MinSizeRel, ubuntu-latest) (pull_request) Successful in 6m0s
CI / ci (Debug, ubuntu-latest) (pull_request) Successful in 18m14s
2025-06-20 10:17:38 -06:00

View File

@ -1843,7 +1843,9 @@ get_bit_size = fn (type: &Type) u64
},
.array =>
{
return get_bit_size(type.content.array.element_type);
>element_bit_size = get_byte_size(type.content.array.element_type) * 8;
>result = element_bit_size * type.content.array.element_count;
return result;
},
.enum =>
{
@ -8258,8 +8260,18 @@ resolve_type_in_place_debug = fn (module: &Module, type: &Type) void
.integer =>
{
>bit_count = type.content.integer.bit_count;
>dwarf_encoding: LLVMDwarfTypeEncoding = #select(type.content.integer.signed, .signed, .unsigned);
dwarf_encoding = #select(bit_count == 1, .boolean, dwarf_encoding);
>dwarf_encoding: LLVMDwarfTypeEncoding = undefined;
if (bit_count == 1)
{
dwarf_encoding = .boolean;
bit_count = 8;
}
else
{
dwarf_encoding = #select(type.content.integer.signed, .signed, .unsigned);
}
>flags: LLVMDIFlags = zero;
result = LLVMDIBuilderCreateBasicType(module.llvm.di_builder, type.name.pointer, type.name.length, bit_count, dwarf_encoding, flags);
},