<div dir="ltr">Presently EmitAssemblyHelper::EmitAssembly unconditionally leaks an llvm::TargetMachine. This is quite unhelpful when using clang as a library. The attached patch adds a codegen option for whether we permit leaking it, and ties that to the same -disable-free flag that the frontend uses. Please review!<div>

<br></div><div>Nick</div><div><br></div></div>