diff --git a/native/swift/sir-compiler-bridge/src/org/jetbrains/kotlin/sir/bridge/impl/BridgeGeneratorImpl.kt b/native/swift/sir-compiler-bridge/src/org/jetbrains/kotlin/sir/bridge/impl/BridgeGeneratorImpl.kt index 50aebf1181b..0b20fe5f4a6 100644 --- a/native/swift/sir-compiler-bridge/src/org/jetbrains/kotlin/sir/bridge/impl/BridgeGeneratorImpl.kt +++ b/native/swift/sir-compiler-bridge/src/org/jetbrains/kotlin/sir/bridge/impl/BridgeGeneratorImpl.kt @@ -11,7 +11,7 @@ import org.jetbrains.kotlin.sir.SirType import org.jetbrains.kotlin.sir.bridge.* import org.jetbrains.kotlin.sir.util.SirSwiftModule -private const val exportAnnotationFqName = "kotlin.native.internal.ExportForCppRuntime" +private const val exportAnnotationFqName = "kotlin.native.internal.ExportedBridge" private const val stdintHeader = "stdint.h" internal class BridgeGeneratorImpl : BridgeGenerator { diff --git a/native/swift/sir-compiler-bridge/testData/multiple_requests/expected.kt b/native/swift/sir-compiler-bridge/testData/multiple_requests/expected.kt index 8646bea2fa8..fcd04c39ab3 100644 --- a/native/swift/sir-compiler-bridge/testData/multiple_requests/expected.kt +++ b/native/swift/sir-compiler-bridge/testData/multiple_requests/expected.kt @@ -1,12 +1,12 @@ -import kotlin.native.internal.ExportForCppRuntime +import kotlin.native.internal.ExportedBridge -@ExportForCppRuntime("a_b_bar_bridge") +@ExportedBridge("a_b_bar_bridge") public fun a_b_bar_bridge(param1: Int, param2: Long): Int { val result = a.b.bar(param1, param2) return result } -@ExportForCppRuntime("a_b_foo_bridge") +@ExportedBridge("a_b_foo_bridge") public fun a_b_foo_bridge(param1: Int, param2: Long): Boolean { val result = a.b.foo(param1, param2) return result diff --git a/native/swift/sir-compiler-bridge/testData/primitive_parameters/expected.kt b/native/swift/sir-compiler-bridge/testData/primitive_parameters/expected.kt index 9fe15102ba3..66b551735f6 100644 --- a/native/swift/sir-compiler-bridge/testData/primitive_parameters/expected.kt +++ b/native/swift/sir-compiler-bridge/testData/primitive_parameters/expected.kt @@ -1,18 +1,18 @@ -import kotlin.native.internal.ExportForCppRuntime +import kotlin.native.internal.ExportedBridge -@ExportForCppRuntime("a") +@ExportedBridge("a") public fun a(p0: Byte, p1: Short, p2: Int, p3: Long): Int { val result = pkg.a(p0, p1, p2, p3) return result } -@ExportForCppRuntime("b") +@ExportedBridge("b") public fun b(p0: UByte, p1: UShort, p2: UInt, p3: ULong): UInt { val result = pkg.b(p0, p1, p2, p3) return result } -@ExportForCppRuntime("c") +@ExportedBridge("c") public fun c(p0: Boolean): Boolean { val result = pkg.c(p0) return result diff --git a/native/swift/sir-compiler-bridge/testData/primitive_types/expected.kt b/native/swift/sir-compiler-bridge/testData/primitive_types/expected.kt index dcd7f12bb16..89461dc5c09 100644 --- a/native/swift/sir-compiler-bridge/testData/primitive_types/expected.kt +++ b/native/swift/sir-compiler-bridge/testData/primitive_types/expected.kt @@ -1,30 +1,30 @@ -import kotlin.native.internal.ExportForCppRuntime +import kotlin.native.internal.ExportedBridge -@ExportForCppRuntime("a_bridge") +@ExportedBridge("a_bridge") public fun a_bridge(): Boolean { val result = a() return result } -@ExportForCppRuntime("b_bridge") +@ExportedBridge("b_bridge") public fun b_bridge(): Short { val result = b() return result } -@ExportForCppRuntime("c_bridge") +@ExportedBridge("c_bridge") public fun c_bridge(): Int { val result = c() return result } -@ExportForCppRuntime("d_bridge") +@ExportedBridge("d_bridge") public fun d_bridge(): Long { val result = d() return result } -@ExportForCppRuntime("e_bridge") +@ExportedBridge("e_bridge") public fun e_bridge(): Byte { val result = e() return result diff --git a/native/swift/sir-compiler-bridge/testData/smoke0/expected.kt b/native/swift/sir-compiler-bridge/testData/smoke0/expected.kt index 1bc517c569f..68e6a09dba6 100644 --- a/native/swift/sir-compiler-bridge/testData/smoke0/expected.kt +++ b/native/swift/sir-compiler-bridge/testData/smoke0/expected.kt @@ -1,6 +1,6 @@ -import kotlin.native.internal.ExportForCppRuntime +import kotlin.native.internal.ExportedBridge -@ExportForCppRuntime("a_b_foo_bridge") +@ExportedBridge("a_b_foo_bridge") public fun a_b_foo_bridge(param1: Int, param2: Long): Int { val result = a.b.foo(param1, param2) return result diff --git a/native/swift/sir-compiler-bridge/testData/unsigned_primitive_types/expected.kt b/native/swift/sir-compiler-bridge/testData/unsigned_primitive_types/expected.kt index 614685c6d45..b34acafae97 100644 --- a/native/swift/sir-compiler-bridge/testData/unsigned_primitive_types/expected.kt +++ b/native/swift/sir-compiler-bridge/testData/unsigned_primitive_types/expected.kt @@ -1,24 +1,24 @@ -import kotlin.native.internal.ExportForCppRuntime +import kotlin.native.internal.ExportedBridge -@ExportForCppRuntime("b_bridge") +@ExportedBridge("b_bridge") public fun b_bridge(): UShort { val result = b() return result } -@ExportForCppRuntime("c_bridge") +@ExportedBridge("c_bridge") public fun c_bridge(): UInt { val result = c() return result } -@ExportForCppRuntime("d_bridge") +@ExportedBridge("d_bridge") public fun d_bridge(): ULong { val result = d() return result } -@ExportForCppRuntime("e_bridge") +@ExportedBridge("e_bridge") public fun e_bridge(): UByte { val result = e() return result diff --git a/plugins/swift-export/testData/simple.golden.kt b/plugins/swift-export/testData/simple.golden.kt index 78dbac7e167..4d0cf133c1f 100644 --- a/plugins/swift-export/testData/simple.golden.kt +++ b/plugins/swift-export/testData/simple.golden.kt @@ -1,18 +1,18 @@ -import kotlin.native.internal.ExportForCppRuntime +import kotlin.native.internal.ExportedBridge -@ExportForCppRuntime("namespace1_main_foobar") +@ExportedBridge("namespace1_main_foobar") public fun namespace1_main_foobar(): Int { val result = namespace1.main.foobar() return result } -@ExportForCppRuntime("namespace1_foo") +@ExportedBridge("namespace1_foo") public fun namespace1_foo(): Int { val result = namespace1.foo() return result } -@ExportForCppRuntime("namespace2_bar") +@ExportedBridge("namespace2_bar") public fun namespace2_bar(): Int { val result = namespace2.bar() return result