Browse Source

Add internal linkage to static map calls

gingerBill 2 years ago
parent
commit
f9576c2f5b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/llvm_backend.cpp

+ 2 - 1
src/llvm_backend.cpp

@@ -493,6 +493,7 @@ lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
 	lb_begin_procedure_body(p);
 	lb_begin_procedure_body(p);
 	defer (lb_end_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, "readonly");
 	lb_add_attribute_to_proc(m, p->value, "nounwind");
 	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);
 	lb_begin_procedure_body(p);
 	defer (lb_end_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, "nounwind");
-	lb_add_attribute_to_proc(m, p->value, "noinline");
 
 
 	lbValue map_ptr      = {LLVMGetParam(p->value, 0), t_rawptr};
 	lbValue map_ptr      = {LLVMGetParam(p->value, 0), t_rawptr};
 	lbValue hash         = {LLVMGetParam(p->value, 1), t_uintptr};
 	lbValue hash         = {LLVMGetParam(p->value, 1), t_uintptr};