aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-09-13 00:58:39 +0100
committergingerBill <bill@gingerbill.org>2021-09-13 00:58:39 +0100
commitfb8fa5217d4a5081dacc0a74a786cd2efc964fdb (patch)
tree49724edef53493c6630aa8b2ae91ea3ad57621a4 /src/llvm_backend.cpp
parent6585601765c24523e43ca3a158abc61d373168db (diff)
Begin minimize `Type` size by replacing `Array` with `Slice` etc
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index 5fff3c486..3e8498776 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -761,7 +761,7 @@ lbProcedure *lb_create_main_procedure(lbModule *m, lbProcedure *startup_runtime)
if (build_context.metrics.os == TargetOs_windows && build_context.build_mode == BuildMode_DynamicLibrary) {
is_dll_main = true;
name = str_lit("DllMain");
- array_init(&params->Tuple.variables, permanent_allocator(), 3);
+ slice_init(&params->Tuple.variables, permanent_allocator(), 3);
params->Tuple.variables[0] = alloc_entity_param(nullptr, make_token_ident("hinstDLL"), t_rawptr, false, true);
params->Tuple.variables[1] = alloc_entity_param(nullptr, make_token_ident("fdwReason"), t_u32, false, true);
params->Tuple.variables[2] = alloc_entity_param(nullptr, make_token_ident("lpReserved"), t_rawptr, false, true);
@@ -769,12 +769,12 @@ lbProcedure *lb_create_main_procedure(lbModule *m, lbProcedure *startup_runtime)
name = str_lit("mainCRTStartup");
} else {
has_args = true;
- array_init(&params->Tuple.variables, permanent_allocator(), 2);
+ slice_init(&params->Tuple.variables, permanent_allocator(), 2);
params->Tuple.variables[0] = alloc_entity_param(nullptr, make_token_ident("argc"), t_i32, false, true);
params->Tuple.variables[1] = alloc_entity_param(nullptr, make_token_ident("argv"), t_ptr_cstring, false, true);
}
- array_init(&results->Tuple.variables, permanent_allocator(), 1);
+ slice_init(&results->Tuple.variables, permanent_allocator(), 1);
results->Tuple.variables[0] = alloc_entity_param(nullptr, blank_token, t_i32, false, true);
Type *proc_type = alloc_type_proc(nullptr,