From da283d5a7fb531427e74cb6003f451cb9b15f0ca Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 12 Mar 2020 22:33:49 +0000 Subject: Add `byval` --- src/check_type.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/check_type.cpp') 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; + } + } } } -- cgit v1.2.3