[Native] Drop createArrayOfExpression from IrUtils2

We can reuse the same function from common `IrUtils`
This commit is contained in:
Ivan Kylchik
2023-08-15 14:49:52 +02:00
committed by Space Team
parent 962172f96d
commit 4376e58acb
2 changed files with 1 additions and 14 deletions
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.backend.konan.lower
import org.jetbrains.kotlin.backend.common.FileLoweringPass
import org.jetbrains.kotlin.backend.common.getOrPut
import org.jetbrains.kotlin.backend.common.ir.createArrayOfExpression
import org.jetbrains.kotlin.backend.common.lower.EnumWhenLowering
import org.jetbrains.kotlin.backend.common.lower.at
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
@@ -191,20 +191,6 @@ fun IrBuilderWithScope.irCatch(type: IrType) =
}
)
fun CommonBackendContext.createArrayOfExpression(
startOffset: Int, endOffset: Int,
arrayElementType: IrType,
arrayElements: List<IrExpression>
): IrExpression {
val arrayType = ir.symbols.array.typeWith(arrayElementType)
val arg0 = IrVarargImpl(startOffset, endOffset, arrayType, arrayElementType, arrayElements)
return irCall(startOffset, endOffset, ir.symbols.arrayOf.owner, listOf(arrayElementType)).apply {
putValueArgument(0, arg0)
}
}
fun createField(
startOffset: Int,
endOffset: Int,