[Native] Use FORWARD_DECLARATIONS_MODULE_NAME instead of hardcoded value

This commit is contained in:
Ivan Kylchik
2023-08-15 12:13:40 +02:00
committed by Space Team
parent 3fba699c49
commit 5661316d7a
5 changed files with 9 additions and 12 deletions
@@ -29,10 +29,6 @@ tailrec fun DeclarationDescriptor.findPackage(): PackageFragmentDescriptor {
else this.containingDeclaration!!.findPackage()
}
// This is Native specific. Try to eliminate.
val ModuleDescriptor.isForwardDeclarationModule get() =
name == Name.special("<forward declarations>")
private fun sourceByIndex(descriptor: CallableMemberDescriptor, index: Int): SourceFile {
val fragment = descriptor.findPackage() as KlibMetadataDeserializedPackageFragment
val fileName = fragment.proto.strings.stringList[index]