Skip to content

Commit

Permalink
Avoid using unnamed bridges for ObjCExport (JetBrains#3393)
Browse files Browse the repository at this point in the history
Since lldb's crashlog.py can't handle them.
  • Loading branch information
SvyatoslavScherbina authored Sep 30, 2019
1 parent 44e04f8 commit 87c13b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
}

Expand Down

0 comments on commit 87c13b8

Please sign in to comment.