[IR] Change the return type of getFunctionDeclaration to be nullable

#KT-64807
This commit is contained in:
Ivan Kylchik
2024-02-07 19:14:02 +01:00
committed by Space Team
parent 91f818ba5a
commit f1bc542d74
3 changed files with 11 additions and 8 deletions
@@ -32,8 +32,8 @@ internal class InlineFunctionsSupport(mapping: NativeMapping) {
// TODO: This is a bit hacky. Think about adopting persistent IR ideas.
internal class NativeInlineFunctionResolver(override val context: Context, val generationState: NativeGenerationState) : InlineFunctionResolverReplacingCoroutineIntrinsics(context) {
override fun getFunctionDeclaration(symbol: IrFunctionSymbol): IrFunction {
val function = super.getFunctionDeclaration(symbol)
override fun getFunctionDeclaration(symbol: IrFunctionSymbol): IrFunction? {
val function = super.getFunctionDeclaration(symbol) ?: return null
generationState.inlineFunctionOrigins[function]?.let { return it.irFunction }