[Interop][Metadata] Mark UniqId as public
Public declaration's UniqId should have MSB == 1. Despite we using our own mangling scheme we still need to respect this convention. Otherwise IrLinker will go crazy searching for missing local declaration.
This commit is contained in:
committed by
Sergey Bogolepov
parent
f10965cbec
commit
b6b447c0d5
+7
-1
@@ -51,5 +51,11 @@ internal class StubIrUniqIdProvider {
|
||||
?: error("Unexpected origin ${typeAlias.origin} for typealias ${typeAlias.alias.fqName}.")
|
||||
}.toUniqId()
|
||||
|
||||
private fun String.toUniqId() = UniqId(cityHash64())
|
||||
/**
|
||||
* MSB should be set to 1 for public declarations.
|
||||
* @see org.jetbrains.kotlin.ir.util.UniqId
|
||||
*/
|
||||
private fun Long.markAsPublic() = this or (1L shl 63)
|
||||
|
||||
private fun String.toUniqId() = UniqId(cityHash64().markAsPublic())
|
||||
}
|
||||
Reference in New Issue
Block a user