[Native] Replace consequence line and column calls with a single one
This commit is contained in:
+1
-3
@@ -7,7 +7,6 @@ package org.jetbrains.kotlin.backend.wasm.ir2wasm
|
||||
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.IrFileEntry
|
||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||
import org.jetbrains.kotlin.wasm.ir.WasmExpressionBuilder
|
||||
import org.jetbrains.kotlin.wasm.ir.source.location.SourceLocation
|
||||
|
||||
@@ -15,8 +14,7 @@ fun IrElement.getSourceLocation(fileEntry: IrFileEntry?): SourceLocation {
|
||||
if (fileEntry == null) return SourceLocation.NoLocation("fileEntry is null")
|
||||
|
||||
val path = fileEntry.name
|
||||
val startLine = fileEntry.getLineNumber(startOffset)
|
||||
val startColumn = fileEntry.getColumnNumber(startOffset)
|
||||
val (startLine, startColumn) = fileEntry.getLineAndColumnNumbers(startOffset)
|
||||
|
||||
if (startLine < 0 || startColumn < 0) return SourceLocation.NoLocation("startLine or startColumn < 0")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user