[KLIB] Add API to access file's part of data as ByteArray

It requires for computing fingerprint of IrFile in IC infra
This commit is contained in:
Roman Artemev
2021-08-20 16:05:25 +03:00
committed by TeamCityServer
parent e4c2d4937f
commit 7d8c86caf1
4 changed files with 75 additions and 5 deletions
@@ -84,6 +84,16 @@ class ICKotlinLibrary(private val icData: List<SerializedIrFile>) : IrLibrary {
override fun file(index: Int): ByteArray = icData[index].fileData
override fun fileCount(): Int = icData.size
override fun types(fileIndex: Int): ByteArray = icData[fileIndex].types
override fun signatures(fileIndex: Int): ByteArray = icData[fileIndex].signatures
override fun strings(fileIndex: Int): ByteArray = icData[fileIndex].strings
override fun declarations(fileIndex: Int): ByteArray = icData[fileIndex].declarations
override fun bodies(fileIndex: Int): ByteArray = icData[fileIndex].bodies
}
class CurrentModuleWithICDeserializer(