JVM IR: retain optional annotations as package private classes

Similarly to how it's done in the old backend (see
PackageCodegenImpl.generateClassesAndObjectsInFile and
AnnotationCodegen.genAnnotation)
This commit is contained in:
Alexander Udalov
2019-12-17 19:25:37 +01:00
parent 5d3ef4c632
commit 0cb48999ff
9 changed files with 76 additions and 14 deletions
@@ -136,7 +136,7 @@ fun generateKLib(
val moduleName = configuration[CommonConfigurationKeys.MODULE_NAME]!!
if (!configuration.klibMpp) {
moduleFragment.acceptVoid(ExpectDeclarationRemover(psi2IrContext.symbolTable, false))
moduleFragment.acceptVoid(ExpectDeclarationRemover(psi2IrContext.symbolTable, doRemove = false, keepOptionalAnnotations = false))
}
serializeModuleIntoKlib(