[Native] Replace consequence line and column calls with a single one

This commit is contained in:
Ivan Kylchik
2023-09-18 11:28:56 +02:00
committed by Space Team
parent 1be98b8f08
commit 350ee4be1d
10 changed files with 79 additions and 65 deletions
@@ -64,7 +64,8 @@ private class PerformByIrFilePhase<Context : CommonBackendContext>(
} catch (e: Throwable) {
CodegenUtil.reportBackendException(e, "IR lowering", irFile.fileEntry.name) { offset ->
irFile.fileEntry.takeIf { it.supportsDebugInfo }?.let {
it.getLineNumber(offset) to it.getColumnNumber(offset)
val (line, column) = it.getLineAndColumnNumbers(offset)
line to column
}
}
}
@@ -113,7 +114,8 @@ private class PerformByIrFilePhase<Context : CommonBackendContext>(
thrownFromThread.get()?.let { (e, irFile) ->
CodegenUtil.reportBackendException(e, "Experimental parallel IR backend", irFile.fileEntry.name) { offset ->
irFile.fileEntry.takeIf { it.supportsDebugInfo }?.let {
it.getLineNumber(offset) to it.getColumnNumber(offset)
val (line, column) = it.getLineAndColumnNumbers(offset)
line to column
}
}
}