diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-04-04 16:58:22 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-04-04 16:58:22 +0200 |
| commit | a7056f2b4f8ac7c5fe78b00cbae686da4867e206 (patch) | |
| tree | 04b7c02c62226f4775cdf4e4d78a2edb2f006782 /src/llvm_abi.cpp | |
| parent | 5fe0788cffcbcfd153ea23954b5a11a853ef50b4 (diff) | |
fix lbArg_Ignore logic
Fixes #2698
Diffstat (limited to 'src/llvm_abi.cpp')
| -rw-r--r-- | src/llvm_abi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp index 724e4e35a..49b5224ec 100644 --- a/src/llvm_abi.cpp +++ b/src/llvm_abi.cpp @@ -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); |