From 44a66bdfe66897846beaeaf7aa6501d447e44540 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Fri, 10 Apr 2020 19:21:39 +0300 Subject: [PATCH] Avoid adding redundant public symbols by ObjCExport with caches --- .../backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt index 09d9ca52924..9c85e5ffded 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/objcexport/ObjCExportCodeGenerator.kt @@ -486,6 +486,7 @@ private fun ObjCExportCodeGenerator.replaceExternalWeakOrCommonGlobal( // Note: actually this is required only if global's weak/common definition is in another object file, // but it is simpler to do this for all globals, considering that all usages can't be removed by DCE anyway. context.llvm.usedGlobals += global.llvmGlobal + LLVMSetVisibility(global.llvmGlobal, LLVMVisibility.LLVMHiddenVisibility) } } }