fix(compiler): Delete target machine when no more in use (prevent leak in compilation)

This commit is contained in:
Quentin Bourgerie
2022-03-01 15:38:20 +01:00
parent 73da7da81c
commit e72101f5c7

View File

@@ -65,7 +65,7 @@ llvm::Error emitObject(llvm::Module &module, string objectPath) {
objectFile->os().flush();
objectFile->os().close();
objectFile->keep();
delete targetMachine;
return llvm::Error::success();
}