Skip to content

Commit

Permalink
[FIR2IR] Rename fir2IrResultPostCompute to `irModuleFragmentPostCom…
Browse files Browse the repository at this point in the history
…pute` and simplify it

The first parameter `ModuleCompilerAnalyzedOutput` is actually unused
  • Loading branch information
KvanTTT authored and qodana-bot committed Apr 2, 2024
1 parent d17b772 commit 8a15106
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ fun transformFirToIr(
visibilityConverter = Fir2IrVisibilityConverter.Default,
kotlinBuiltIns = builtInsModule ?: DefaultBuiltIns.Instance,
actualizerTypeContextProvider = ::IrTypeSystemContextImpl
) { _, irModuleFragment ->
) { irModuleFragment ->
(irModuleFragment.descriptor as? FirModuleDescriptor)?.let { it.allDependencyModules = librariesDescriptors }
}.also {
performanceManager?.notifyIRTranslationFinished()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fun FirResult.convertToIrAndActualize(
visibilityConverter: Fir2IrVisibilityConverter,
kotlinBuiltIns: KotlinBuiltIns,
actualizerTypeContextProvider: (IrBuiltIns) -> IrTypeSystemContext,
fir2IrResultPostCompute: (ModuleCompilerAnalyzedOutput, IrModuleFragment) -> Unit = { _, _ -> },
irModuleFragmentPostCompute: (IrModuleFragment) -> Unit = { _ -> },
): Fir2IrActualizedResult {
require(outputs.isNotEmpty()) { "No modules found" }

Expand Down Expand Up @@ -122,7 +122,7 @@ fun FirResult.convertToIrAndActualize(
}

val irModuleFragment = Fir2IrConverter.generateIrModuleFragment(componentsStorage, firOutput.fir).also {
fir2IrResultPostCompute(firOutput, it)
irModuleFragmentPostCompute(it)
}

if (isMainOutput) {
Expand Down

0 comments on commit 8a15106

Please sign in to comment.