Struct
All checks were successful
All checks were successful
This commit is contained in:
parent
d91ebf3147
commit
c67acde5b8
@ -3902,12 +3902,18 @@ pub const Module = struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (coerce_to_type.bb == .structure and argument_abi.flags.kind == .direct and argument_abi.flags.can_be_flattened) {
|
if (coerce_to_type.bb == .structure and argument_abi.flags.kind == .direct and argument_abi.flags.can_be_flattened) {
|
||||||
module.emit_value(function, semantic_argument_value);
|
|
||||||
|
|
||||||
const source_type_size_is_scalable = false; // TODO
|
const source_type_size_is_scalable = false; // TODO
|
||||||
if (source_type_size_is_scalable) {
|
if (source_type_size_is_scalable) {
|
||||||
@trap();
|
@trap();
|
||||||
} else {
|
} else {
|
||||||
|
if (src.kind == .right) {
|
||||||
|
if (src.bb == .variable_reference) {
|
||||||
|
src.type = null;
|
||||||
|
src.kind = .left;
|
||||||
|
module.analyze_value_type(function, src, .{});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module.emit_value(function, semantic_argument_value);
|
||||||
const destination_size = coerce_to_type.get_byte_size();
|
const destination_size = coerce_to_type.get_byte_size();
|
||||||
const source_size = argument_abi.semantic_type.get_byte_size();
|
const source_size = argument_abi.semantic_type.get_byte_size();
|
||||||
|
|
||||||
@ -7524,7 +7530,7 @@ pub const Abi = struct {
|
|||||||
true => {
|
true => {
|
||||||
for (coerce_to_type.bb.structure.fields, 0..) |field, field_index| {
|
for (coerce_to_type.bb.structure.fields, 0..) |field, field_index| {
|
||||||
const index = argument_type_abi.abi_start + field_index;
|
const index = argument_type_abi.abi_start + field_index;
|
||||||
llvm_abi_argument_type_buffer[index] = field.type.llvm.handle.?;
|
llvm_abi_argument_type_buffer[index] = field.type.resolve(module).handle;
|
||||||
abi_argument_type_buffer[index] = field.type;
|
abi_argument_type_buffer[index] = field.type;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -231,4 +231,5 @@ const names = &[_][]const u8{
|
|||||||
"slice",
|
"slice",
|
||||||
"small_struct_ints",
|
"small_struct_ints",
|
||||||
"struct_assignment",
|
"struct_assignment",
|
||||||
|
"struct",
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user