mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 07:04:58 -07:00
Add #by_ptr procedure attribute to enforce a parameter to be passed by pointer internally
This commit is contained in:
@@ -1958,11 +1958,12 @@ LLVMTypeRef lb_type_internal(lbModule *m, Type *type) {
|
||||
if (e->flags & EntityFlag_CVarArg) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Type *e_type = reduce_tuple_to_single_type(e->type);
|
||||
|
||||
LLVMTypeRef param_type = nullptr;
|
||||
if (is_type_boolean(e_type) &&
|
||||
if (e->flags & EntityFlag_ByPtr) {
|
||||
param_type = lb_type(m, alloc_type_pointer(e_type));
|
||||
} else if (is_type_boolean(e_type) &&
|
||||
type_size_of(e_type) <= 1) {
|
||||
param_type = LLVMInt1TypeInContext(m->ctx);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user