[codegeneration][debug info] enchance debugger behaviour for paramterless when

- generates tramboline like a11b07f6c3 on -Xg-generate-when-marker=enable
- fixes issue KT-33364
This commit is contained in:
Vasily Levchenko
2021-05-31 13:09:41 +02:00
parent 70924f6c15
commit bebede9e4f
5 changed files with 24 additions and 0 deletions
@@ -178,6 +178,15 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
null
}
})
putIfNotNull(GENERATE_WHEN_MARKER, when (val it = arguments.generateWhenMarkerString) {
"enable" -> true
"disable" -> false
null -> null
else -> {
configuration.report(ERROR, "Unsupported -Xg-generate-when-marker= value: $it. Possible values are 'enable'/'disable'")
null
}
})
put(STATIC_FRAMEWORK, selectFrameworkType(configuration, arguments, outputKind))
put(OVERRIDE_CLANG_OPTIONS, arguments.clangOptions.toNonNullList())
put(ALLOCATION_MODE, arguments.allocator)
@@ -171,6 +171,12 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
description = """generates marker of inlined function body on call site to make debugger breakpoint resolution more accurate"""
)
var generateInlinedFunctionMarkerString: String? = null
@Argument(
value = "-Xg-generate-when-marker",
valueDescription = "{disable|enable}",
description = """generates marker of when to make debugger breakpoint resolution more accurate"""
)
var generateWhenMarkerString: String? = null
@Argument(