IR: remove SourceManager, make PsiSourceManager a singleton

This commit is contained in:
Alexander Udalov
2021-02-21 20:39:05 +01:00
parent 8ff0b1e243
commit f332192de8
33 changed files with 135 additions and 212 deletions
@@ -35,14 +35,14 @@ abstract class AbstractIrSourceRangesTestCase : AbstractIrGeneratorTestCase() {
}
}
private fun IrElement.dumpWithSourceLocations(fileEntry: SourceManager.FileEntry): String =
private fun IrElement.dumpWithSourceLocations(fileEntry: IrFileEntry): String =
StringBuilder().also {
acceptVoid(DumpSourceLocations(it, fileEntry))
}.toString()
private class DumpSourceLocations(
out: Appendable,
val fileEntry: SourceManager.FileEntry
val fileEntry: IrFileEntry
) : IrElementVisitorVoid {
val printer = Printer(out, " ")
val elementRenderer = RenderIrElementVisitor()