[Swift Export] Use ExportedBridge instead of ExportForCppRuntime

ExportedBridge annotation actually does what we need in Swift Export.
Unlike ExportForCppRuntime, it prevents symbol from DCE.
This commit is contained in:
Sergey Bogolepov
2023-12-12 18:32:40 +02:00
committed by Space Team
parent d83027720d
commit 01976990e8
7 changed files with 25 additions and 25 deletions
@@ -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