mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-08 03:24:19 +00:00
Merge pull request #865 from matias-eduardo/patch_llvm_bool_return_types
Add LLVM boolean compatibility to result types
This commit is contained in:
@@ -2388,6 +2388,18 @@ Type *type_to_abi_compat_result_type(gbAllocator a, Type *original_type, ProcCal
|
||||
new_type = tuple;
|
||||
}
|
||||
|
||||
if (cc == ProcCC_None) {
|
||||
for_array(i, new_type->Tuple.variables) {
|
||||
Type *result_type = new_type->Tuple.variables[i]->type;
|
||||
if (is_type_boolean(result_type)) {
|
||||
Type *t = core_type(base_type(result_type));
|
||||
if (t == t_bool) {
|
||||
new_type->Tuple.variables[i]->type = t_llvm_bool;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new_type->cached_size = -1;
|
||||
new_type->cached_align = -1;
|
||||
return new_type;
|
||||
|
||||
Reference in New Issue
Block a user