[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
+4 -4
View File
@@ -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