Extract & use GenerationState.metadataVersion helper

This commit is contained in:
Mikhail Glukhikh
2022-12-02 13:22:13 +01:00
parent f332b6dcec
commit f6b8b3438a
4 changed files with 13 additions and 11 deletions
@@ -609,9 +609,7 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
// TODO: expect -> actual mapping
val expectDescriptorToSymbol = mutableMapOf<DeclarationDescriptor, IrSymbol>()
val metadataVersion =
configuration.get(CommonConfigurationKeys.METADATA_VERSION)
?: GenerationState.LANGUAGE_TO_METADATA_VERSION.getValue(configuration.languageVersionSettings.languageVersion)
val metadataVersion = GenerationState.metadataVersion(configuration)
serializeModuleIntoKlib(
configuration[CommonConfigurationKeys.MODULE_NAME]!!,