diff options
| author | gingerBill <bill@gingerbill.org> | 2024-07-14 12:39:30 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-07-14 12:39:30 +0100 |
| commit | 3dff83f3dc2914cdfb9a8f19cf990682cda41b03 (patch) | |
| tree | 216cbef3e900ba3d4291d7a49c03e61cf9b748ac /src/llvm_abi.cpp | |
| parent | 8642d719f0ece3625d535d47b41ff4d35072f47f (diff) | |
Mock out `#no_capture` for future use
Diffstat (limited to 'src/llvm_abi.cpp')
| -rw-r--r-- | src/llvm_abi.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp index b2e485d01..9a3479b34 100644 --- a/src/llvm_abi.cpp +++ b/src/llvm_abi.cpp @@ -15,6 +15,7 @@ struct lbArgType { LLVMAttributeRef align_attribute; // Optional i64 byval_alignment; bool is_byval; + bool no_capture; }; @@ -159,6 +160,11 @@ gb_internal void lb_add_function_type_attributes(LLVMValueRef fn, lbFunctionType LLVMAddAttributeAtIndex(fn, arg_index+1, arg->align_attribute); } + if (arg->no_capture) { + LLVMAddAttributeAtIndex(fn, arg_index+1, nocapture_attr); + } + + if (ft->multiple_return_original_type) { if (ft->original_arg_count <= i) { LLVMAddAttributeAtIndex(fn, arg_index+1, noalias_attr); |