aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-03-15 14:31:26 +0000
committergingerBill <bill@gingerbill.org>2020-03-15 14:31:26 +0000
commit18fb6a4be41f30de75b445266b958e153ecc16d9 (patch)
tree6770795d754effc1751d8c7beb13652db39f3770 /src/check_type.cpp
parentbf0c6f5a30e406a0e0f73014c024ba63dcb47b43 (diff)
parent8dba0e332c73a08301c5ac6c0d310c483c66cb11 (diff)
Merge branch 'master' into llvm-integration
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;
+ }
+ }
}
}