Add possibility to dump lowered ir in tests before lowering execution

This commit is contained in:
Ivan Kylchik
2021-12-13 14:08:39 +03:00
parent 592baf134e
commit fac98b7787
10 changed files with 5 additions and 2 deletions
@@ -113,7 +113,7 @@ fun <Data, Context> dumpToFile(
val dumpStrategy = System.getProperty("org.jetbrains.kotlin.compiler.ir.dump.strategy")
val extPrefix = if (dumpStrategy == "KotlinLike") "kt." else ""
val fileName = "${phaseIdFormatted}_${actionState.phase.name}.$extPrefix$fileExtension"
val fileName = "${phaseIdFormatted}_${actionState.beforeOrAfter}.${actionState.phase.name}.$extPrefix$fileExtension"
File(directoryFile, fileName).writeText(dumpContent)
}