[K/N] Fixed a problem with built coroutine visibility

#KT-55494 Fixed
This commit is contained in:
Igor Chevdar
2022-12-15 19:26:02 +02:00
committed by Space Team
parent 0f2ebeea15
commit 0e4e53786c
3 changed files with 3 additions and 3 deletions
@@ -221,7 +221,7 @@ abstract class AbstractSuspendFunctionsLowering<C : CommonBackendContext>(val co
endOffset = irFunction.endOffset
origin = DECLARATION_ORIGIN_COROUTINE_IMPL
name = nameForCoroutineClass(irFunction)
visibility = irFunction.visibility
visibility = DescriptorVisibilities.PRIVATE
}.apply {
parent = irFunction.parent
createParameterDeclarations()
@@ -16,7 +16,7 @@ open class EmptyContinuation(override val context: CoroutineContext = EmptyCorou
suspend fun suspendForever(): Int = suspendCoroutineUninterceptedOrReturn {
COROUTINE_SUSPENDED
}
// CHECK-LABEL: define %struct.ObjHeader* @"kfun:$fooCOROUTINE
// CHECK-LABEL: define internal %struct.ObjHeader* @"kfun:$fooCOROUTINE
// CHECK-NOT: ; Function Attrs: {{.*}}noreturn
// CHECK-LABEL: define %struct.ObjHeader* @"kfun:#foo#suspend(kotlin.coroutines.Continuation<kotlin.Nothing>){}kotlin.Any"
@@ -281,7 +281,7 @@ suspend fun s23(f: Boolean) {
// CHECK-LABEL: define %struct.ObjHeader* @"kfun:#s24#suspend(kotlin.coroutines.Continuation<kotlin.Unit>){}kotlin.Any
suspend fun s24() {
// CHECK: call void @"kfun:$s24COROUTINE${{[0-9]*}}#<init>
// CHECK: call void @"kfun:$s24COROUTINE${{[0-9]*}}.<init>#internal
sInt()
}
// CHECK-LABEL: epilogue: