JetBrains / kotlin-native

Kotlin/Native infrastructure
Apache License 2.0
7.02k stars 566 forks source link

[IR][cache] Fix for https://youtrack.jetbrains.com/issue/KT-44764 #4710

Closed homuroll closed 3 years ago

homuroll commented 3 years ago

The .konanLibrary is cached for each declaration for performance purposes, but it is only ok to do it after IR has been lowered to its final state (or at least when declarations aren't being moved around), so the fix respects that by only taking .konanLibrary of a IrFile (it is assumed that files stay on their place during entire backend lowering procedure).