diff options
| author | gingerBill <bill@gingerbill.org> | 2024-07-14 12:59:55 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-07-14 12:59:55 +0100 |
| commit | 8650180cccad02b39a00dcd05f696a8e3879c29e (patch) | |
| tree | fb1ffb0a2cc27bdd6d73e5fbde0a29580faed156 /src/llvm_abi.cpp | |
| parent | 5027c7081e02cc208a354cbad2fbeb90ac297b03 (diff) | |
Change Odin calling convention to not do a copy on `byval` for SysV
Diffstat (limited to 'src/llvm_abi.cpp')
| -rw-r--r-- | src/llvm_abi.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp index 9a3479b34..c21cd0a46 100644 --- a/src/llvm_abi.cpp +++ b/src/llvm_abi.cpp @@ -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); } |