Don't import CreateNSStringFromKString into LLVM module twice (#1374)

#KT-23037 Fixed
This commit is contained in:
SvyatoslavScherbina
2018-03-01 16:54:08 +03:00
committed by Nikolay Igotti
parent 983aad79b9
commit 51a83a41ed
3 changed files with 3 additions and 2 deletions
@@ -197,6 +197,8 @@ internal class InteropBuiltIns(builtIns: KonanBuiltIns) {
val exportObjCClass = packageScope.getContributedClass("ExportObjCClass")
val CreateNSStringFromKString = packageScope.getContributedFunctions("CreateNSStringFromKString").single()
}
private fun MemberScope.getContributedVariables(name: String) =
@@ -424,7 +424,6 @@ internal class Llvm(val context: Context, val llvmModule: LLVMModuleRef) {
val Kotlin_ObjCExport_refToObjC by lazyRtFunction
val Kotlin_ObjCExport_refFromObjC by lazyRtFunction
val Kotlin_Interop_CreateNSStringFromKString by lazyRtFunction
val Kotlin_Interop_CreateNSArrayFromKList by lazyRtFunction
val Kotlin_Interop_CreateNSMutableArrayFromKList by lazyRtFunction
val Kotlin_Interop_CreateNSSetFromKSet by lazyRtFunction
@@ -414,7 +414,7 @@ private fun ObjCExportCodeGenerator.emitKotlinFunctionAdaptersToBlock() {
private fun ObjCExportCodeGenerator.emitSpecialClassesConvertions() {
setObjCExportTypeInfo(
context.builtIns.string,
constPointer(context.llvm.Kotlin_Interop_CreateNSStringFromKString)
constPointer(codegen.llvmFunction(context.interopBuiltIns.CreateNSStringFromKString))
)
setObjCExportTypeInfo(