LTO: Simplify ownership of LTOCodeGenerator::TargetMach.
[oota-llvm.git] / include / llvm / LTO / LTOCodeGenerator.h
index 695de5aa9946adde64efe4eafc270a78debe4c91..a7ccbceda4136e1a4fffb9522f87d4eb3b7d9a00 100644 (file)
@@ -159,7 +159,7 @@ private:
   std::unique_ptr<LLVMContext> OwnedContext;
   LLVMContext &Context;
   Linker IRLinker;
-  TargetMachine *TargetMach = nullptr;
+  std::unique_ptr<TargetMachine> TargetMach;
   bool EmitDwarfDebugInfo = false;
   bool ScopeRestrictionsDone = false;
   lto_codegen_model CodeModel = LTO_CODEGEN_PIC_MODEL_DEFAULT;