Merge pull request #3372 from laytan/fix-lbarg-ignore-logic

fix lbArg_Ignore logic
This commit is contained in:
gingerBill
2024-04-04 18:09:12 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -192,7 +192,7 @@ gb_internal void lb_add_function_type_attributes(LLVMValueRef fn, lbFunctionType
// }
LLVMSetFunctionCallConv(fn, cc_kind);
if (calling_convention == ProcCC_Odin) {
unsigned context_index = offset+arg_count;
unsigned context_index = arg_index;
LLVMAddAttributeAtIndex(fn, context_index, noalias_attr);
LLVMAddAttributeAtIndex(fn, context_index, nonnull_attr);
LLVMAddAttributeAtIndex(fn, context_index, nocapture_attr);