Added support for LTO options: sample_profile, new_pass_manager and debug_pass_manager

Differential Revision: https://reviews.llvm.org/D45275

llvm-svn: 329598
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index f3d6896..861f73c 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -104,6 +104,11 @@
   lto::ThinBackend Backend;
   if (Config->ThinLTOJobs != -1u)
     Backend = lto::createInProcessThinBackend(Config->ThinLTOJobs);
+
+  Conf.SampleProfile = Config->LTOSampleProfile;
+  Conf.UseNewPM = Config->LTONewPassManager;
+  Conf.DebugPassManager = Config->LTODebugPassManager;
+
   return llvm::make_unique<lto::LTO>(std::move(Conf), Backend,
                                      Config->LTOPartitions);
 }