Avoid using unnamed bridges for ObjCExport (#3393)

Since lldb's crashlog.py can't handle them.
This commit is contained in:
SvyatoslavScherbina
2019-09-30 18:23:04 +03:00
committed by GitHub
parent 44e04f886f
commit 87c13b8d88
2 changed files with 4 additions and 4 deletions
@@ -74,7 +74,7 @@ internal fun ObjCExportCodeGenerator.generateBlockToKotlinFunctionConverter(
return generateFunction(
codegen,
functionType(codegen.kObjHeaderPtr, false, int8TypePtr, codegen.kObjHeaderPtrPtr),
""
"convertBlock${bridge.nameSuffix}"
) {
val blockPtr = param(0)
ifThen(icmpEq(blockPtr, kNullInt8Ptr)) {
@@ -542,7 +542,7 @@ private inline fun ObjCExportCodeGenerator.generateObjCImpBy(
methodBridge: MethodBridge,
genBody: FunctionGenerationContext.() -> Unit
): LLVMValueRef {
val result = LLVMAddFunction(context.llvmModule, "", objCFunctionType(context, methodBridge))!!
val result = LLVMAddFunction(context.llvmModule, "objc2kotlin", objCFunctionType(context, methodBridge))!!
generateFunction(codegen, result) {
genBody()
@@ -720,7 +720,7 @@ private fun ObjCExportCodeGenerator.generateKotlinToObjCBridge(
val functionType = codegen.getLlvmFunctionType(irFunction)
val result = generateFunction(codegen, functionType, "") {
val result = generateFunction(codegen, functionType, "kotlin2objc") {
var errorOutPtr: LLVMValueRef? = null
var kotlinResultOutPtr: LLVMValueRef? = null
lateinit var kotlinResultOutBridge: TypeBridge
@@ -1167,7 +1167,7 @@ private inline fun ObjCExportCodeGenerator.generateObjCToKotlinSyntheticGetter(
)
val encoding = getEncoding(methodBridge)
val imp = generateFunction(codegen, objCFunctionType(context, methodBridge), "") {
val imp = generateFunction(codegen, objCFunctionType(context, methodBridge), "objc2kotlin") {
block()
}