Fix KotlinFrameworkSupportProviderTest

This commit is contained in:
Georgy Bronnikov
2018-11-30 18:00:00 +03:00
parent ae7cc8a133
commit f4aad70b36
2 changed files with 20 additions and 10 deletions
@@ -206,31 +206,31 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
value = "-Xdisable-phases", value = "-Xdisable-phases",
description = "Disable backend phases" description = "Disable backend phases"
) )
var disablePhases: Array<String> by FreezableVar(emptyArray()) var disablePhases: Array<String>? by FreezableVar(null)
@Argument( @Argument(
value = "-Xverbose-phases", value = "-Xverbose-phases",
description = "Be verbose while performing these backend phases" description = "Be verbose while performing these backend phases"
) )
var verbosePhases: Array<String> by FreezableVar(emptyArray()) var verbosePhases: Array<String>? by FreezableVar(null)
@Argument( @Argument(
value = "-Xphases-to-dump-before", value = "-Xphases-to-dump-before",
description = "Dump backend state before these phases" description = "Dump backend state before these phases"
) )
var phasesToDumpBefore: Array<String> by FreezableVar(emptyArray()) var phasesToDumpBefore: Array<String>? by FreezableVar(null)
@Argument( @Argument(
value = "-Xphases-to-dump-after", value = "-Xphases-to-dump-after",
description = "Dump backend state after these phases" description = "Dump backend state after these phases"
) )
var phasesToDumpAfter: Array<String> by FreezableVar(emptyArray()) var phasesToDumpAfter: Array<String>? by FreezableVar(null)
@Argument( @Argument(
value = "-Xphases-to-dump", value = "-Xphases-to-dump",
description = "Dump backend state both before and after these phases" description = "Dump backend state both before and after these phases"
) )
var phasesToDump: Array<String> by FreezableVar(emptyArray()) var phasesToDump: Array<String>? by FreezableVar(null)
@Argument( @Argument(
value = "-Xprofile-phases", value = "-Xprofile-phases",
@@ -163,11 +163,21 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> extends CLI
setupLanguageVersionSettings(configuration, arguments); setupLanguageVersionSettings(configuration, arguments);
configuration.put(CommonConfigurationKeys.LIST_PHASES, arguments.getListPhases()); configuration.put(CommonConfigurationKeys.LIST_PHASES, arguments.getListPhases());
configuration.put(CommonConfigurationKeys.DISABLED_PHASES, SetsKt.setOf(arguments.getDisablePhases())); if (arguments.getDisablePhases() != null) {
configuration.put(CommonConfigurationKeys.VERBOSE_PHASES, SetsKt.setOf(arguments.getVerbosePhases())); configuration.put(CommonConfigurationKeys.DISABLED_PHASES, SetsKt.setOf(arguments.getDisablePhases()));
configuration.put(CommonConfigurationKeys.PHASES_TO_DUMP_STATE_BEFORE, SetsKt.setOf(arguments.getPhasesToDumpBefore())); }
configuration.put(CommonConfigurationKeys.PHASES_TO_DUMP_STATE_AFTER, SetsKt.setOf(arguments.getPhasesToDumpAfter())); if (arguments.getVerbosePhases() != null) {
configuration.put(CommonConfigurationKeys.PHASES_TO_DUMP_STATE, SetsKt.setOf(arguments.getPhasesToDump())); configuration.put(CommonConfigurationKeys.VERBOSE_PHASES, SetsKt.setOf(arguments.getVerbosePhases()));
}
if (arguments.getPhasesToDumpBefore() != null) {
configuration.put(CommonConfigurationKeys.PHASES_TO_DUMP_STATE_BEFORE, SetsKt.setOf(arguments.getPhasesToDumpBefore()));
}
if (arguments.getPhasesToDumpAfter() != null) {
configuration.put(CommonConfigurationKeys.PHASES_TO_DUMP_STATE_AFTER, SetsKt.setOf(arguments.getPhasesToDumpAfter()));
}
if (arguments.getPhasesToDump() != null) {
configuration.put(CommonConfigurationKeys.PHASES_TO_DUMP_STATE, SetsKt.setOf(arguments.getPhasesToDump()));
}
configuration.put(CommonConfigurationKeys.PROFILE_PHASES, arguments.getProfilePhases()); configuration.put(CommonConfigurationKeys.PROFILE_PHASES, arguments.getProfilePhases());
} }