From f9576c2f5bc6e1354a9e736b32bdfb193593173b Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 11 Nov 2022 15:28:20 +0000 Subject: Add internal linkage to static map calls --- src/llvm_backend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/llvm_backend.cpp') 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}; -- cgit v1.2.3