[debug info][variables] do not generate debug info for temporal variables
This commit is contained in:
+2
-1
@@ -1168,7 +1168,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
|||||||
val location = codegen.generateLocationInfo(locationInfo)
|
val location = codegen.generateLocationInfo(locationInfo)
|
||||||
val file = (currentCodeContext.fileScope() as FileScope).file.file()
|
val file = (currentCodeContext.fileScope() as FileScope).file.file()
|
||||||
return when (element) {
|
return when (element) {
|
||||||
is IrVariable -> debugInfoLocalVariableLocation(
|
is IrVariable -> if (element.origin != IrDeclarationOrigin.IR_TEMPORARY_VARIABLE) debugInfoLocalVariableLocation(
|
||||||
builder = context.debugInfo.builder,
|
builder = context.debugInfo.builder,
|
||||||
functionScope = locationInfo.scope,
|
functionScope = locationInfo.scope,
|
||||||
diType = element.descriptor.type.diType(context, codegen.llvmTargetData),
|
diType = element.descriptor.type.diType(context, codegen.llvmTargetData),
|
||||||
@@ -1176,6 +1176,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
|||||||
file = file,
|
file = file,
|
||||||
line = locationInfo.line,
|
line = locationInfo.line,
|
||||||
location = location)
|
location = location)
|
||||||
|
else null
|
||||||
is IrValueParameter -> debugInfoParameterLocation(
|
is IrValueParameter -> debugInfoParameterLocation(
|
||||||
builder = context.debugInfo.builder,
|
builder = context.debugInfo.builder,
|
||||||
functionScope = locationInfo.scope,
|
functionScope = locationInfo.scope,
|
||||||
|
|||||||
Reference in New Issue
Block a user