diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt index a4879cebbde..8f8d4f7567d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt @@ -229,6 +229,7 @@ internal class KonanSymbols( val throwInvalidReceiverTypeException = internalFunction("ThrowInvalidReceiverTypeException") val throwIllegalStateException = internalFunction("ThrowIllegalStateException") + val throwIllegalStateExceptionWithMessage = internalFunction("ThrowIllegalStateExceptionWithMessage") override val ThrowUninitializedPropertyAccessException = internalFunction("ThrowUninitializedPropertyAccessException") diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt index 7c80587eb04..b67541b162d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt @@ -675,8 +675,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map body.statements.forEach { generateStatement(it) } is IrExpressionBody -> generateStatement(body.expression) diff --git a/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt b/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt index fd5df9706be..24fbd80a50d 100644 --- a/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt +++ b/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt @@ -66,6 +66,12 @@ internal fun ThrowIllegalStateException() : Nothing { throw IllegalStateException() } +@ExportForCppRuntime +internal fun ThrowIllegalStateExceptionWithMessage(message:String) : Nothing { + throw IllegalStateException(message) +} + + @ExportForCppRuntime internal fun ThrowNotImplementedError(): Nothing { throw NotImplementedError("An operation is not implemented.")