Disposed target data

(cherry picked from commit 250be87acf66d5c780fb593f46da3540a536e049)
This commit is contained in:
Igor Chevdar
2019-10-17 19:01:49 +03:00
committed by TeamCityServer
parent ba50a8275c
commit c5249ac714
@@ -338,8 +338,10 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
LLVMDisposeDIBuilder(debugInfo.builder)
if (llvmModule != null)
LLVMDisposeModule(llvmModule)
if (::llvm.isInitialized)
if (::llvm.isInitialized) {
LLVMDisposeTargetData(llvm.runtime.targetData)
LLVMDisposeModule(llvm.runtime.llvmModule)
}
tryDisposeLLVMContext()
llvmDisposed = true
}