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