| ... | @@ -1227,7 +1227,7 @@ static LLVMValueRef get_safety_crash_err_fn(CodeGen *g) { | ... | @@ -1227,7 +1227,7 @@ static LLVMValueRef get_safety_crash_err_fn(CodeGen *g) { |
| 1227 | LLVMValueRef msg_prefix_init = LLVMConstString(unwrap_err_msg_text, strlen(unwrap_err_msg_text), 1); | 1227 | LLVMValueRef msg_prefix_init = LLVMConstString(unwrap_err_msg_text, strlen(unwrap_err_msg_text), 1); |
| 1228 | LLVMValueRef msg_prefix = LLVMAddGlobal(g->module, LLVMTypeOf(msg_prefix_init), ""); | 1228 | LLVMValueRef msg_prefix = LLVMAddGlobal(g->module, LLVMTypeOf(msg_prefix_init), ""); |
| 1229 | LLVMSetInitializer(msg_prefix, msg_prefix_init); | 1229 | LLVMSetInitializer(msg_prefix, msg_prefix_init); |
| 1230 | LLVMSetLinkage(msg_prefix, LLVMInternalLinkage); | 1230 | LLVMSetLinkage(msg_prefix, LLVMPrivateLinkage); |
| 1231 | LLVMSetGlobalConstant(msg_prefix, true); | 1231 | LLVMSetGlobalConstant(msg_prefix, true); |
| 1232 | | 1232 | |
| 1233 | const char *fn_name = get_mangled_name(g, "__zig_fail_unwrap", false); | 1233 | const char *fn_name = get_mangled_name(g, "__zig_fail_unwrap", false); |
| ... | @@ -7180,7 +7180,7 @@ static void render_const_val_global(CodeGen *g, ZigValue *const_val, const char | ... | @@ -7180,7 +7180,7 @@ static void render_const_val_global(CodeGen *g, ZigValue *const_val, const char |
| 7180 | LLVMTypeRef type_ref = const_val->llvm_value ? | 7180 | LLVMTypeRef type_ref = const_val->llvm_value ? |
| 7181 | LLVMTypeOf(const_val->llvm_value) : get_llvm_type(g, const_val->type); | 7181 | LLVMTypeOf(const_val->llvm_value) : get_llvm_type(g, const_val->type); |
| 7182 | LLVMValueRef global_value = LLVMAddGlobal(g->module, type_ref, name); | 7182 | LLVMValueRef global_value = LLVMAddGlobal(g->module, type_ref, name); |
| 7183 | LLVMSetLinkage(global_value, LLVMInternalLinkage); | 7183 | LLVMSetLinkage(global_value, (name == nullptr) ? LLVMPrivateLinkage : LLVMInternalLinkage); |
| 7184 | LLVMSetGlobalConstant(global_value, true); | 7184 | LLVMSetGlobalConstant(global_value, true); |
| 7185 | LLVMSetUnnamedAddr(global_value, true); | 7185 | LLVMSetUnnamedAddr(global_value, true); |
| 7186 | LLVMSetAlignment(global_value, (const_val->llvm_align == 0) ? | 7186 | LLVMSetAlignment(global_value, (const_val->llvm_align == 0) ? |