aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 010b31f03..089e66c4d 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2434,6 +2434,13 @@ void set_procedure_abi_types(gbAllocator allocator, Type *type) {
}
break;
}
+
+ if (build_context.ODIN_OS == "linux" ||
+ build_context.ODIN_OS == "darwin") {
+ if (is_type_pointer(new_type) & !is_type_pointer(e->type)) {
+ e->flags |= EntityFlag_ByVal;
+ }
+ }
}
}