Avoid unneeded debug info location in non-debug mode

This commit is contained in:
Pavel Punegov
2018-12-28 16:09:21 +03:00
committed by Pavel Punegov
parent ff2ab80e3e
commit 3a5cc6c5f1
@@ -1853,11 +1853,11 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
}
private val IrElement.startLocation: LocationInfo?
get() = if (startOffset == UNDEFINED_OFFSET) null
get() = if (!context.shouldContainDebugInfo() || startOffset == UNDEFINED_OFFSET) null
else currentCodeContext.location(startLine(), startColumn())
private val IrElement.endLocation: LocationInfo?
get() = if (startOffset == UNDEFINED_OFFSET) null
get() = if (!context.shouldContainDebugInfo() || startOffset == UNDEFINED_OFFSET) null
else currentCodeContext.location(endLine(), endColumn())
//-------------------------------------------------------------------------//