aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_abi.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-09-13 01:30:30 +0100
committergingerBill <bill@gingerbill.org>2021-09-13 01:30:30 +0100
commit042dbda47f8a428c1be2b1af2937f0cbff109c11 (patch)
tree9185639a96d96da650ab290961531036f6ec4e8c /src/llvm_abi.cpp
parent2d7aea79b94721362f4fc5285c2a99ab37f52a58 (diff)
Replace many uses of `heap_allocator()` with `permanent_allocator()`
Diffstat (limited to 'src/llvm_abi.cpp')
-rw-r--r--src/llvm_abi.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp
index e9bae42af..83de3dd84 100644
--- a/src/llvm_abi.cpp
+++ b/src/llvm_abi.cpp
@@ -82,7 +82,7 @@ LLVMTypeRef lb_function_type_to_llvm_ptr(lbFunctionType *ft, bool is_var_arg) {
GB_ASSERT_MSG(ret != nullptr, "%d", ft->ret.kind);
unsigned maximum_arg_count = offset+arg_count;
- LLVMTypeRef *args = gb_alloc_array(heap_allocator(), LLVMTypeRef, maximum_arg_count);
+ LLVMTypeRef *args = gb_alloc_array(permanent_allocator(), LLVMTypeRef, maximum_arg_count);
if (offset == 1) {
GB_ASSERT(ft->ret.kind == lbArg_Indirect);
args[0] = LLVMPointerType(ft->ret.type, 0);
@@ -300,7 +300,7 @@ namespace lbAbi386 {
lbArgType compute_return_type(LLVMContextRef c, LLVMTypeRef return_type, bool return_is_defined);
LB_ABI_INFO(abi_info) {
- lbFunctionType *ft = gb_alloc_item(heap_allocator(), lbFunctionType);
+ lbFunctionType *ft = gb_alloc_item(permanent_allocator(), lbFunctionType);
ft->ctx = c;
ft->args = compute_arg_types(c, arg_types, arg_count);
ft->ret = compute_return_type(c, return_type, return_is_defined);
@@ -378,7 +378,7 @@ namespace lbAbiAmd64Win64 {
LB_ABI_INFO(abi_info) {
- lbFunctionType *ft = gb_alloc_item(heap_allocator(), lbFunctionType);
+ lbFunctionType *ft = gb_alloc_item(permanent_allocator(), lbFunctionType);
ft->ctx = c;
ft->args = compute_arg_types(c, arg_types, arg_count);
ft->ret = lbAbi386::compute_return_type(c, return_type, return_is_defined);
@@ -469,7 +469,7 @@ namespace lbAbiAmd64SysV {
LLVMTypeRef llreg(LLVMContextRef c, Array<RegClass> const &reg_classes);
LB_ABI_INFO(abi_info) {
- lbFunctionType *ft = gb_alloc_item(heap_allocator(), lbFunctionType);
+ lbFunctionType *ft = gb_alloc_item(permanent_allocator(), lbFunctionType);
ft->ctx = c;
ft->calling_convention = calling_convention;
@@ -849,7 +849,7 @@ namespace lbAbiArm64 {
bool is_homogenous_aggregate(LLVMContextRef c, LLVMTypeRef type, LLVMTypeRef *base_type_, unsigned *member_count_);
LB_ABI_INFO(abi_info) {
- lbFunctionType *ft = gb_alloc_item(heap_allocator(), lbFunctionType);
+ lbFunctionType *ft = gb_alloc_item(permanent_allocator(), lbFunctionType);
ft->ctx = c;
ft->ret = compute_return_type(c, return_type, return_is_defined);
ft -> args = compute_arg_types(c, arg_types, arg_count);
@@ -1034,7 +1034,7 @@ LB_ABI_INFO(lb_get_abi_info) {
case ProcCC_None:
case ProcCC_InlineAsm:
{
- lbFunctionType *ft = gb_alloc_item(heap_allocator(), lbFunctionType);
+ lbFunctionType *ft = gb_alloc_item(permanent_allocator(), lbFunctionType);
ft->ctx = c;
ft->args = array_make<lbArgType>(heap_allocator(), arg_count);
for (unsigned i = 0; i < arg_count; i++) {