aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_abi.cpp
diff options
context:
space:
mode:
authorAndreas T Jonsson <mail@andreasjonsson.se>2024-05-02 09:34:17 +0200
committerAndreas T Jonsson <mail@andreasjonsson.se>2024-05-02 09:34:17 +0200
commit021271091a6cedc1cb460b8d271dcc5b653775f0 (patch)
treeacedf14b5bdc9d12a4a14992e0e76910d1c8ff06 /src/llvm_abi.cpp
parentc1ff7894dfcc1edfd420a10ab81eef00f2e36b10 (diff)
parent7feff1c11335be9c0d804c3ca93050b7d154aad8 (diff)
Merge branch 'netbsd' into netbsd-ci
Diffstat (limited to 'src/llvm_abi.cpp')
-rw-r--r--src/llvm_abi.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp
index 88bb58c55..85a16d321 100644
--- a/src/llvm_abi.cpp
+++ b/src/llvm_abi.cpp
@@ -1131,8 +1131,9 @@ namespace lbAbiArm64 {
if (size <= 16) {
LLVMTypeRef cast_type = nullptr;
- GB_ASSERT(size > 0);
- if (size <= 8) {
+ if (size == 0) {
+ cast_type = LLVMStructTypeInContext(c, nullptr, 0, false);
+ } else if (size <= 8) {
cast_type = LLVMIntTypeInContext(c, cast(unsigned)(size*8));
} else {
unsigned count = cast(unsigned)((size+7)/8);