On KLIB-based backends, private functions can leak through internal inline functions to other files or even modules (if the internal inline function is called from a friend module). Such private functions (that are called from inline functions with higher visibility) must be wrapped in synthetic accessor functions that have the highest visibility of all the inline functions that transitively call that private function.
To ensure that all the needed synthetic accessors are indeed generated, we use two techniques:
Tests in this directory include various combinations and corner cases to verify the synthetic accessor generation logic in SyntheticAccessorLowering.
NOTE:
*KlibSyntheticAccessorsInPhase*TestGenerated only compile these tests up to and including the last IR lowering, which means that we don‘t run LLVM (on Kotlin/Native) and obviously don’t run the executable (on Kotlin/Native there is no executable).*KlibSyntheticAccessorsBoxTestGenerated perform usual codegen/box tests, which check