Refactor CompilationErrorHandler

It only had one implementation THROW_EXCEPTION, inline it everywhere
with a call to a static method
This commit is contained in:
Alexander Udalov
2019-12-02 17:41:35 +01:00
parent 2435b8d9fa
commit fd627603a0
20 changed files with 97 additions and 137 deletions
@@ -139,9 +139,7 @@ object GenerationUtils {
).build()
generationState.beforeCompile()
codegenFactory.generateModuleInFrontendIRMode(
generationState, moduleFragment, CompilationErrorHandler.THROW_EXCEPTION, symbolTable, sourceManager
)
codegenFactory.generateModuleInFrontendIRMode(generationState, moduleFragment, symbolTable, sourceManager)
generationState.factory.done()
return generationState
}
@@ -170,8 +168,8 @@ object GenerationUtils {
else DefaultCodegenFactory
).isIrBackend(isIrBackend).build()
if (analysisResult.shouldGenerateCode) {
KotlinCodegenFacade.compileCorrectFiles(generationState, CompilationErrorHandler.THROW_EXCEPTION)
KotlinCodegenFacade.compileCorrectFiles(generationState)
}
return generationState
}
}
}