diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt index 5fcf0800390..b4c2b6c95b3 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt @@ -123,8 +123,8 @@ val LLVMValueRef.isConst:Boolean internal inline fun generateFunction(codegen: CodeGenerator, function: IrFunction, - startLocation: LocationInfo? = null, - endLocation: LocationInfo? = null, + startLocation: LocationInfo?, + endLocation: LocationInfo?, code: FunctionGenerationContext.(FunctionGenerationContext) -> R) { val llvmFunction = codegen.llvmFunction(function) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt index 6d62568240d..6a8d36b0ea6 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt @@ -370,7 +370,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map - generateFunction(codegen, fileInitFunction, null, null) { + generateFunction(codegen, fileInitFunction, fileInitFunction.location(start = true), fileInitFunction.location(start = false)) { using(FunctionScope(fileInitFunction, it)) { val parameterScope = ParameterScope(fileInitFunction, functionGenerationContext) using(parameterScope) usingParameterScope@{ @@ -387,7 +387,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map - generateFunction(codegen, fileInitFunction, null, null) { + generateFunction(codegen, fileInitFunction, fileInitFunction.location(start = true), fileInitFunction.location(start = false)) { using(FunctionScope(fileInitFunction, it)) { val parameterScope = ParameterScope(fileInitFunction, functionGenerationContext) using(parameterScope) usingParameterScope@{