diff --git a/src/compiler/llvm_codegen_function.c b/src/compiler/llvm_codegen_function.c index 73f988d8e..76077848a 100644 --- a/src/compiler/llvm_codegen_function.c +++ b/src/compiler/llvm_codegen_function.c @@ -607,7 +607,7 @@ void llvm_emit_function_decl(GenContext *c, Decl *decl) { llvm_attribute_add(c, function, attribute_id.naked, -1); } - if (prototype->call_abi == CALL_X86_STD) + if (prototype->call_abi == CALL_X86_STD && decl->visibility != VISIBLE_LOCAL) { if (platform_target.os == OS_TYPE_WIN32) {