diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt index c3f93302941..40cc4fd67e4 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt @@ -33,6 +33,10 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean { // Treat any `@ExportForCppRuntime` declaration as exported. return true } + if (this.annotations.hasAnnotation(exportForCompilerAnnotation)){ + return true + } + if (this is ConstructorDescriptor && constructedClass.kind.isSingleton) { // Currently code generator can access the constructor of the singleton, @@ -58,6 +62,8 @@ private val symbolNameAnnotation = FqName("konan.SymbolName") private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppRuntime") +private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompiler") + private fun typeToHashString(type: KotlinType): String { if (TypeUtils.isTypeParameter(type)) return "GENERIC"