diff options
| author | gingerBill <bill@gingerbill.org> | 2020-03-12 22:33:49 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-03-12 22:33:49 +0000 |
| commit | da283d5a7fb531427e74cb6003f451cb9b15f0ca (patch) | |
| tree | acfccde3afe4da22c92ea5fec43d5c866d53aea6 /src/check_type.cpp | |
| parent | 2a2d3273eae791c5c21eb77374f4818c2a76ae1b (diff) | |
Add `byval`
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 7 |
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; + } + } } } |