aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-11-11 15:28:20 +0000
committergingerBill <bill@gingerbill.org>2022-11-11 15:28:20 +0000
commitf9576c2f5bc6e1354a9e736b32bdfb193593173b (patch)
tree7754927d637cfe27e06aff9184d6aac20426e50a /src/llvm_backend.cpp
parent16fc96101049ef884401ab6182ea860390abd6a9 (diff)
Add internal linkage to static map calls
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index 4c34a56e9..4d2f95bdf 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -493,6 +493,7 @@ lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
lb_begin_procedure_body(p);
defer (lb_end_procedure_body(p));
+ LLVMSetLinkage(p->value, LLVMInternalLinkage);
lb_add_attribute_to_proc(m, p->value, "readonly");
lb_add_attribute_to_proc(m, p->value, "nounwind");
@@ -642,8 +643,8 @@ lbValue lb_map_set_proc_for_type(lbModule *m, Type *type) {
lb_begin_procedure_body(p);
defer (lb_end_procedure_body(p));
+ LLVMSetLinkage(p->value, LLVMInternalLinkage);
lb_add_attribute_to_proc(m, p->value, "nounwind");
- lb_add_attribute_to_proc(m, p->value, "noinline");
lbValue map_ptr = {LLVMGetParam(p->value, 0), t_rawptr};
lbValue hash = {LLVMGetParam(p->value, 1), t_uintptr};