[K/N] Fix debug info in lazy initializers
This commit is contained in:
+2
-2
@@ -123,8 +123,8 @@ val LLVMValueRef.isConst:Boolean
|
|||||||
|
|
||||||
internal inline fun<R> generateFunction(codegen: CodeGenerator,
|
internal inline fun<R> generateFunction(codegen: CodeGenerator,
|
||||||
function: IrFunction,
|
function: IrFunction,
|
||||||
startLocation: LocationInfo? = null,
|
startLocation: LocationInfo?,
|
||||||
endLocation: LocationInfo? = null,
|
endLocation: LocationInfo?,
|
||||||
code: FunctionGenerationContext.(FunctionGenerationContext) -> R) {
|
code: FunctionGenerationContext.(FunctionGenerationContext) -> R) {
|
||||||
val llvmFunction = codegen.llvmFunction(function)
|
val llvmFunction = codegen.llvmFunction(function)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -370,7 +370,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
|||||||
f()
|
f()
|
||||||
|
|
||||||
context.llvm.initializersGenerationState.globalInitFunction?.let { fileInitFunction ->
|
context.llvm.initializersGenerationState.globalInitFunction?.let { fileInitFunction ->
|
||||||
generateFunction(codegen, fileInitFunction, null, null) {
|
generateFunction(codegen, fileInitFunction, fileInitFunction.location(start = true), fileInitFunction.location(start = false)) {
|
||||||
using(FunctionScope(fileInitFunction, it)) {
|
using(FunctionScope(fileInitFunction, it)) {
|
||||||
val parameterScope = ParameterScope(fileInitFunction, functionGenerationContext)
|
val parameterScope = ParameterScope(fileInitFunction, functionGenerationContext)
|
||||||
using(parameterScope) usingParameterScope@{
|
using(parameterScope) usingParameterScope@{
|
||||||
@@ -387,7 +387,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
|||||||
}
|
}
|
||||||
|
|
||||||
context.llvm.initializersGenerationState.threadLocalInitFunction?.let { fileInitFunction ->
|
context.llvm.initializersGenerationState.threadLocalInitFunction?.let { fileInitFunction ->
|
||||||
generateFunction(codegen, fileInitFunction, null, null) {
|
generateFunction(codegen, fileInitFunction, fileInitFunction.location(start = true), fileInitFunction.location(start = false)) {
|
||||||
using(FunctionScope(fileInitFunction, it)) {
|
using(FunctionScope(fileInitFunction, it)) {
|
||||||
val parameterScope = ParameterScope(fileInitFunction, functionGenerationContext)
|
val parameterScope = ParameterScope(fileInitFunction, functionGenerationContext)
|
||||||
using(parameterScope) usingParameterScope@{
|
using(parameterScope) usingParameterScope@{
|
||||||
|
|||||||
Reference in New Issue
Block a user