Removes unneeded lookups / Adds sret to call site which fixes the mac bug

This commit is contained in:
Platin21
2021-12-23 01:59:31 +01:00
parent 0548db4230
commit 8dbeed8a9f
2 changed files with 10 additions and 6 deletions

View File

@@ -736,6 +736,10 @@ lbValue lb_emit_call_internal(lbProcedure *p, lbValue value, lbValue return_ptr,
LLVMValueRef ret = LLVMBuildCall2(p->builder, fnp, fn, args, arg_count, "");
if (return_ptr.value != nullptr) {
LLVMAddCallSiteAttribute(ret, 1, lb_create_enum_attribute_with_type(p->module->ctx, "sret", LLVMTypeOf(args[0])));
}
switch (inlining) {
case ProcInlining_none:
break;