mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Merge pull request #3479 from laytan/support-0-sized-return-arm64-abi
compiler: support returning 0 sized types in arm64 abi
This commit is contained in:
+3
-2
@@ -1131,8 +1131,9 @@ namespace lbAbiArm64 {
|
|||||||
if (size <= 16) {
|
if (size <= 16) {
|
||||||
LLVMTypeRef cast_type = nullptr;
|
LLVMTypeRef cast_type = nullptr;
|
||||||
|
|
||||||
GB_ASSERT(size > 0);
|
if (size == 0) {
|
||||||
if (size <= 8) {
|
cast_type = LLVMStructTypeInContext(c, nullptr, 0, false);
|
||||||
|
} else if (size <= 8) {
|
||||||
cast_type = LLVMIntTypeInContext(c, cast(unsigned)(size*8));
|
cast_type = LLVMIntTypeInContext(c, cast(unsigned)(size*8));
|
||||||
} else {
|
} else {
|
||||||
unsigned count = cast(unsigned)((size+7)/8);
|
unsigned count = cast(unsigned)((size+7)/8);
|
||||||
|
|||||||
Reference in New Issue
Block a user