From cd9c5322e8fee529dfa71cf526219af62b083684 Mon Sep 17 00:00:00 2001 From: Vasily Levchenko Date: Tue, 21 Apr 2020 15:20:38 +0200 Subject: [PATCH] [codegen][debug info] more accurate file manupulating on location calculation --- .../kotlin/backend/konan/llvm/IrToBitcode.kt | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) 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 0cfe1573af4..30df3864670 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 @@ -184,7 +184,7 @@ internal interface CodeContext { /** * Returns location information for given source location [LocationInfo]. */ - fun location(line:Int, column: Int): LocationInfo? + fun location(offset: Int): LocationInfo? /** * Returns [DIScopeOpaqueRef] instance for corresponding scope. @@ -263,7 +263,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map fileScope?.let{LocationInfo(scope, it.file.fileEntry.line(offset), it.file.fileEntry.column(offset)) } } override fun scope() = scope } @@ -1670,9 +1667,9 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map