Resurrect -Xprint-ir flag. (#3127)

This commit is contained in:
Nikolay Igotti
2019-06-28 14:48:06 +03:00
committed by GitHub
parent 5e0c161042
commit 60fb50aeb7
3 changed files with 3 additions and 16 deletions
@@ -218,9 +218,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
}
}
override fun createArguments(): K2NativeCompilerArguments {
return K2NativeCompilerArguments()
}
override fun createArguments() = K2NativeCompilerArguments()
override fun executableScriptFileName() = "kotlinc-native"
@@ -5,7 +5,6 @@
package org.jetbrains.kotlin.cli.bc
import org.jetbrains.kotlin.backend.konan.TestRunnerKind
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.Argument
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
@@ -198,6 +197,8 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
super.configureAnalysisFlags(collector).also {
val useExperimental = it[AnalysisFlags.useExperimental] as List<*>
it[AnalysisFlags.useExperimental] = useExperimental + listOf("kotlin.ExperimentalUnsignedTypes")
if (printIr)
phasesToDumpAfter = arrayOf("ALL")
}
}
@@ -427,20 +427,8 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
printIr()
printBitCode()
}
fun shouldVerifyDescriptors() = config.configuration.getBoolean(KonanConfigKeys.VERIFY_DESCRIPTORS)
fun shouldVerifyIr() = config.configuration.getBoolean(KonanConfigKeys.VERIFY_IR)
fun shouldVerifyBitCode() = config.configuration.getBoolean(KonanConfigKeys.VERIFY_BITCODE)
fun shouldPrintDescriptors() = config.configuration.getBoolean(KonanConfigKeys.PRINT_DESCRIPTORS)
fun shouldPrintIr() = config.configuration.getBoolean(KonanConfigKeys.PRINT_IR)
fun shouldPrintIrWithDescriptors()=
config.configuration.getBoolean(KonanConfigKeys.PRINT_IR_WITH_DESCRIPTORS)
fun shouldPrintBitCode() = config.configuration.getBoolean(KonanConfigKeys.PRINT_BITCODE)
fun shouldPrintLocations() = config.configuration.getBoolean(KonanConfigKeys.PRINT_LOCATIONS)