Avoid adding redundant public symbols by ObjCExport with caches

This commit is contained in:
Svyatoslav Scherbina
2020-04-10 19:21:39 +03:00
committed by SvyatoslavScherbina
parent 990c754f77
commit 44a66bdfe6
@@ -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)
}
}
}