mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-26 00:03:54 +00:00
Change Odin calling convention to not do a copy on byval for SysV
This commit is contained in:
@@ -651,10 +651,10 @@ namespace lbAbiAmd64SysV {
|
||||
if (is_mem_cls(cls, attribute_kind)) {
|
||||
LLVMAttributeRef attribute = nullptr;
|
||||
if (attribute_kind == Amd64TypeAttribute_ByVal) {
|
||||
// if (!is_calling_convention_odin(calling_convention)) {
|
||||
return lb_arg_type_indirect_byval(c, type);
|
||||
// }
|
||||
// attribute = nullptr;
|
||||
if (is_calling_convention_odin(calling_convention)) {
|
||||
return lb_arg_type_indirect(type, attribute);
|
||||
}
|
||||
return lb_arg_type_indirect_byval(c, type);
|
||||
} else if (attribute_kind == Amd64TypeAttribute_StructRect) {
|
||||
attribute = lb_create_enum_attribute_with_type(c, "sret", type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user