[lld] r368936 - [LLD] Migrate llvm::make_unique to std::make_unique

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 15:28:18 PDT 2019


Author: jdevlieghere
Date: Wed Aug 14 15:28:17 2019
New Revision: 368936

URL: http://llvm.org/viewvc/llvm-project?rev=368936&view=rev
Log:
[LLD] Migrate llvm::make_unique to std::make_unique

Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

Differential revision: https://reviews.llvm.org/D66259

Modified:
    lld/trunk/COFF/LTO.cpp
    lld/trunk/COFF/PDB.cpp
    lld/trunk/ELF/InputFiles.cpp
    lld/trunk/ELF/LTO.cpp
    lld/trunk/ELF/LinkerScript.cpp
    lld/trunk/ELF/SyntheticSections.cpp
    lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h
    lld/trunk/lib/Driver/DarwinLdDriver.cpp
    lld/trunk/lib/ReaderWriter/FileArchive.cpp
    lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/LayoutPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
    lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp
    lld/trunk/lib/ReaderWriter/MachO/TLVPass.cpp
    lld/trunk/wasm/LTO.cpp

Modified: lld/trunk/COFF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/LTO.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/COFF/LTO.cpp (original)
+++ lld/trunk/COFF/LTO.cpp Wed Aug 14 15:28:17 2019
@@ -46,7 +46,7 @@ using namespace lld::coff;
 static std::unique_ptr<raw_fd_ostream> openFile(StringRef file) {
   std::error_code ec;
   auto ret =
-      llvm::make_unique<raw_fd_ostream>(file, ec, sys::fs::OpenFlags::OF_None);
+      std::make_unique<raw_fd_ostream>(file, ec, sys::fs::OpenFlags::OF_None);
   if (ec) {
     error("cannot open " + file + ": " + ec.message());
     return nullptr;
@@ -105,7 +105,7 @@ BitcodeCompiler::BitcodeCompiler() {
     backend = lto::createInProcessThinBackend(config->thinLTOJobs);
   }
 
-  ltoObj = llvm::make_unique<lto::LTO>(createConfig(), backend,
+  ltoObj = std::make_unique<lto::LTO>(createConfig(), backend,
                                        config->ltoPartitions);
 }
 
@@ -160,8 +160,8 @@ std::vector<StringRef> BitcodeCompiler::
 
   checkError(ltoObj->run(
       [&](size_t task) {
-        return llvm::make_unique<lto::NativeObjectStream>(
-            llvm::make_unique<raw_svector_ostream>(buf[task]));
+        return std::make_unique<lto::NativeObjectStream>(
+            std::make_unique<raw_svector_ostream>(buf[task]));
       },
       cache));
 

Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Wed Aug 14 15:28:17 2019
@@ -1150,7 +1150,7 @@ void DebugSHandler::finish() {
   // string table. Generally the string table subsection appears after the
   // checksum table, so we have to do this after looping over all the
   // subsections.
-  auto newChecksums = make_unique<DebugChecksumsSubsection>(linker.pdbStrTab);
+  auto newChecksums = std::make_unique<DebugChecksumsSubsection>(linker.pdbStrTab);
   for (FileChecksumEntry &fc : checksums) {
     SmallString<128> filename =
         exitOnErr(cVStrTab.getString(fc.FileNameOffset));

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Wed Aug 14 15:28:17 2019
@@ -252,7 +252,7 @@ std::string InputFile::getSrcMsg(const S
 }
 
 template <class ELFT> void ObjFile<ELFT>::initializeDwarf() {
-  dwarf = llvm::make_unique<DWARFContext>(make_unique<LLDDwarfObj<ELFT>>(this));
+  dwarf = std::make_unique<DWARFContext>(std::make_unique<LLDDwarfObj<ELFT>>(this));
   for (std::unique_ptr<DWARFUnit> &cu : dwarf->compile_units()) {
     auto report = [](Error err) {
       handleAllErrors(std::move(err),

Modified: lld/trunk/ELF/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LTO.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/ELF/LTO.cpp (original)
+++ lld/trunk/ELF/LTO.cpp Wed Aug 14 15:28:17 2019
@@ -50,7 +50,7 @@ using namespace lld::elf;
 static std::unique_ptr<raw_fd_ostream> openFile(StringRef file) {
   std::error_code ec;
   auto ret =
-      llvm::make_unique<raw_fd_ostream>(file, ec, sys::fs::OpenFlags::OF_None);
+      std::make_unique<raw_fd_ostream>(file, ec, sys::fs::OpenFlags::OF_None);
   if (ec) {
     error("cannot open " + file + ": " + ec.message());
     return nullptr;
@@ -141,7 +141,7 @@ BitcodeCompiler::BitcodeCompiler() {
     backend = lto::createInProcessThinBackend(config->thinLTOJobs);
   }
 
-  ltoObj = llvm::make_unique<lto::LTO>(createConfig(), backend,
+  ltoObj = std::make_unique<lto::LTO>(createConfig(), backend,
                                        config->ltoPartitions);
 
   // Initialize usedStartStop.
@@ -251,8 +251,8 @@ std::vector<InputFile *> BitcodeCompiler
   if (!bitcodeFiles.empty())
     checkError(ltoObj->run(
         [&](size_t task) {
-          return llvm::make_unique<lto::NativeObjectStream>(
-              llvm::make_unique<raw_svector_ostream>(buf[task]));
+          return std::make_unique<lto::NativeObjectStream>(
+              std::make_unique<raw_svector_ostream>(buf[task]));
         },
         cache));
 

Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Wed Aug 14 15:28:17 2019
@@ -460,7 +460,7 @@ void LinkerScript::processSectionCommand
   // This is needed as there are some cases where we cannot just
   // thread the current state through to a lambda function created by the
   // script parser.
-  auto deleter = make_unique<AddressState>();
+  auto deleter = std::make_unique<AddressState>();
   ctx = deleter.get();
   ctx->outSec = aether;
 
@@ -1057,7 +1057,7 @@ static uint64_t getInitialDot() {
 void LinkerScript::assignAddresses() {
   dot = getInitialDot();
 
-  auto deleter = make_unique<AddressState>();
+  auto deleter = std::make_unique<AddressState>();
   ctx = deleter.get();
   errorOnMissingSection = true;
   switchTo(aether);

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Wed Aug 14 15:28:17 2019
@@ -2629,7 +2629,7 @@ template <class ELFT> GdbIndexSection *G
 
   parallelForEachN(0, sections.size(), [&](size_t i) {
     ObjFile<ELFT> *file = sections[i]->getFile<ELFT>();
-    DWARFContext dwarf(make_unique<LLDDwarfObj<ELFT>>(file));
+    DWARFContext dwarf(std::make_unique<LLDDwarfObj<ELFT>>(file));
 
     chunks[i].sec = sections[i];
     chunks[i].compilationUnits = readCuList(dwarf);

Modified: lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h (original)
+++ lld/trunk/include/lld/ReaderWriter/MachOLinkingContext.h Wed Aug 14 15:28:17 2019
@@ -101,7 +101,7 @@ public:
     auto file = std::unique_ptr<T>(new T(std::forward<Args>(args)...));
     auto *filePtr = file.get();
     auto *ctx = const_cast<MachOLinkingContext *>(this);
-    ctx->getNodes().push_back(llvm::make_unique<FileNode>(std::move(file)));
+    ctx->getNodes().push_back(std::make_unique<FileNode>(std::move(file)));
     return filePtr;
   }
 

Modified: lld/trunk/lib/Driver/DarwinLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/DarwinLdDriver.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/Driver/DarwinLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/DarwinLdDriver.cpp Wed Aug 14 15:28:17 2019
@@ -95,7 +95,7 @@ public:
 static std::vector<std::unique_ptr<File>>
 makeErrorFile(StringRef path, std::error_code ec) {
   std::vector<std::unique_ptr<File>> result;
-  result.push_back(llvm::make_unique<ErrorFile>(path, ec));
+  result.push_back(std::make_unique<ErrorFile>(path, ec));
   return result;
 }
 
@@ -160,7 +160,7 @@ static void addFile(StringRef path, Mach
   std::vector<std::unique_ptr<File>> files =
       loadFile(ctx, path, loadWholeArchive, upwardDylib);
   for (std::unique_ptr<File> &file : files)
-    ctx.getNodes().push_back(llvm::make_unique<FileNode>(std::move(file)));
+    ctx.getNodes().push_back(std::make_unique<FileNode>(std::move(file)));
 }
 
 // Export lists are one symbol per line.  Blank lines are ignored.
@@ -1138,7 +1138,7 @@ static void createFiles(MachOLinkingCont
     ctx.createInternalFiles(Files);
   for (auto i = Files.rbegin(), e = Files.rend(); i != e; ++i) {
     auto &members = ctx.getNodes();
-    members.insert(members.begin(), llvm::make_unique<FileNode>(std::move(*i)));
+    members.insert(members.begin(), std::make_unique<FileNode>(std::move(*i)));
   }
 }
 
@@ -1185,7 +1185,7 @@ bool link(llvm::ArrayRef<const char *> a
     merged = mergedFile.get();
     auto &members = ctx.getNodes();
     members.insert(members.begin(),
-                   llvm::make_unique<FileNode>(std::move(mergedFile)));
+                   std::make_unique<FileNode>(std::move(mergedFile)));
   }
   resolveTask.end();
 

Modified: lld/trunk/lib/ReaderWriter/FileArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/FileArchive.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/FileArchive.cpp (original)
+++ lld/trunk/lib/ReaderWriter/FileArchive.cpp Wed Aug 14 15:28:17 2019
@@ -210,7 +210,7 @@ public:
                                           const Registry &reg) const override {
     StringRef path = mb->getBufferIdentifier();
     std::unique_ptr<File> ret =
-        llvm::make_unique<FileArchive>(std::move(mb), reg, path, _logLoading);
+        std::make_unique<FileArchive>(std::move(mb), reg, path, _logLoading);
     return std::move(ret);
   }
 

Modified: lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/CompactUnwindPass.cpp Wed Aug 14 15:28:17 2019
@@ -573,7 +573,7 @@ private:
 
 void addCompactUnwindPass(PassManager &pm, const MachOLinkingContext &ctx) {
   assert(ctx.needsCompactUnwindPass());
-  pm.add(llvm::make_unique<CompactUnwindPass>(ctx));
+  pm.add(std::make_unique<CompactUnwindPass>(ctx));
 }
 
 } // end namesapce mach_o

Modified: lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/GOTPass.cpp Wed Aug 14 15:28:17 2019
@@ -176,7 +176,7 @@ private:
 
 void addGOTPass(PassManager &pm, const MachOLinkingContext &ctx) {
   assert(ctx.needsGOTPass());
-  pm.add(llvm::make_unique<GOTPass>(ctx));
+  pm.add(std::make_unique<GOTPass>(ctx));
 }
 
 } // end namesapce mach_o

Modified: lld/trunk/lib/ReaderWriter/MachO/LayoutPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/LayoutPass.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/LayoutPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/LayoutPass.cpp Wed Aug 14 15:28:17 2019
@@ -478,7 +478,7 @@ llvm::Error LayoutPass::perform(SimpleFi
 }
 
 void addLayoutPass(PassManager &pm, const MachOLinkingContext &ctx) {
-  pm.add(llvm::make_unique<LayoutPass>(
+  pm.add(std::make_unique<LayoutPass>(
       ctx.registry(), [&](const DefinedAtom * left, const DefinedAtom * right,
                           bool & leftBeforeRight) ->bool {
     return ctx.customAtomOrderer(left, right, leftBeforeRight);

Modified: lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOLinkingContext.cpp Wed Aug 14 15:28:17 2019
@@ -802,9 +802,9 @@ void MachOLinkingContext::addSectCreateS
                                         std::unique_ptr<MemoryBuffer> content) {
 
   if (!_sectCreateFile) {
-    auto sectCreateFile = llvm::make_unique<mach_o::SectCreateFile>();
+    auto sectCreateFile = std::make_unique<mach_o::SectCreateFile>();
     _sectCreateFile = sectCreateFile.get();
-    getNodes().push_back(llvm::make_unique<FileNode>(std::move(sectCreateFile)));
+    getNodes().push_back(std::make_unique<FileNode>(std::move(sectCreateFile)));
   }
 
   assert(_sectCreateFile && "sectcreate file does not exist.");
@@ -1019,7 +1019,7 @@ void MachOLinkingContext::finalizeInputF
     return !isLibrary(a) && isLibrary(b);
   });
   size_t numLibs = std::count_if(elements.begin(), elements.end(), isLibrary);
-  elements.push_back(llvm::make_unique<GroupEnd>(numLibs));
+  elements.push_back(std::make_unique<GroupEnd>(numLibs));
 }
 
 llvm::Error MachOLinkingContext::handleLoadedFile(File &file) {

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Wed Aug 14 15:28:17 2019
@@ -542,7 +542,7 @@ public:
   loadFile(std::unique_ptr<MemoryBuffer> mb,
            const Registry &registry) const override {
     std::unique_ptr<File> ret =
-      llvm::make_unique<MachOFile>(std::move(mb), &_ctx);
+      std::make_unique<MachOFile>(std::move(mb), &_ctx);
     return std::move(ret);
   }
 
@@ -568,7 +568,7 @@ public:
   loadFile(std::unique_ptr<MemoryBuffer> mb,
            const Registry &registry) const override {
     std::unique_ptr<File> ret =
-        llvm::make_unique<MachODylibFile>(std::move(mb), &_ctx);
+        std::make_unique<MachODylibFile>(std::move(mb), &_ctx);
     return std::move(ret);
   }
 

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp Wed Aug 14 15:28:17 2019
@@ -717,7 +717,7 @@ llvm::Error parseStabs(MachOFile &file,
   // FIXME: Kill this off when we can move to sane yaml parsing.
   std::unique_ptr<BumpPtrAllocator> allocator;
   if (copyRefs)
-    allocator = llvm::make_unique<BumpPtrAllocator>();
+    allocator = std::make_unique<BumpPtrAllocator>();
 
   enum { start, inBeginEnd } state = start;
 
@@ -812,7 +812,7 @@ llvm::Error parseStabs(MachOFile &file,
     stabsList.push_back(stab);
   }
 
-  file.setDebugInfo(llvm::make_unique<StabsDebugInfo>(std::move(stabsList)));
+  file.setDebugInfo(std::make_unique<StabsDebugInfo>(std::move(stabsList)));
 
   // FIXME: Kill this off when we fix YAML memory ownership.
   file.debugInfo()->setAllocator(std::move(allocator));
@@ -974,11 +974,11 @@ llvm::Error parseDebugInfo(MachOFile &fi
     //        memory ownership.
     std::unique_ptr<BumpPtrAllocator> allocator;
     if (copyRefs) {
-      allocator = llvm::make_unique<BumpPtrAllocator>();
+      allocator = std::make_unique<BumpPtrAllocator>();
       tuOrErr->name = copyDebugString(tuOrErr->name, *allocator);
       tuOrErr->path = copyDebugString(tuOrErr->path, *allocator);
     }
-    file.setDebugInfo(llvm::make_unique<DwarfDebugInfo>(std::move(*tuOrErr)));
+    file.setDebugInfo(std::make_unique<DwarfDebugInfo>(std::move(*tuOrErr)));
     if (copyRefs)
       file.debugInfo()->setAllocator(std::move(allocator));
   } else

Modified: lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ObjCPass.cpp Wed Aug 14 15:28:17 2019
@@ -124,7 +124,7 @@ private:
 
 
 void addObjCPass(PassManager &pm, const MachOLinkingContext &ctx) {
-  pm.add(llvm::make_unique<ObjCPass>(ctx));
+  pm.add(std::make_unique<ObjCPass>(ctx));
 }
 
 } // end namespace mach_o

Modified: lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/ShimPass.cpp Wed Aug 14 15:28:17 2019
@@ -121,7 +121,7 @@ private:
 
 
 void addShimPass(PassManager &pm, const MachOLinkingContext &ctx) {
-  pm.add(llvm::make_unique<ShimPass>(ctx));
+  pm.add(std::make_unique<ShimPass>(ctx));
 }
 
 } // end namespace mach_o

Modified: lld/trunk/lib/ReaderWriter/MachO/TLVPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/TLVPass.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/TLVPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/TLVPass.cpp Wed Aug 14 15:28:17 2019
@@ -133,7 +133,7 @@ private:
 
 void addTLVPass(PassManager &pm, const MachOLinkingContext &ctx) {
   assert(ctx.needsTLVPass());
-  pm.add(llvm::make_unique<TLVPass>(ctx));
+  pm.add(std::make_unique<TLVPass>(ctx));
 }
 
 } // end namesapce mach_o

Modified: lld/trunk/wasm/LTO.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/LTO.cpp?rev=368936&r1=368935&r2=368936&view=diff
==============================================================================
--- lld/trunk/wasm/LTO.cpp (original)
+++ lld/trunk/wasm/LTO.cpp Wed Aug 14 15:28:17 2019
@@ -67,7 +67,7 @@ static std::unique_ptr<lto::LTO> createL
   lto::ThinBackend backend;
   if (config->thinLTOJobs != -1U)
     backend = lto::createInProcessThinBackend(config->thinLTOJobs);
-  return llvm::make_unique<lto::LTO>(std::move(c), backend,
+  return std::make_unique<lto::LTO>(std::move(c), backend,
                                      config->ltoPartitions);
 }
 
@@ -137,8 +137,8 @@ std::vector<StringRef> BitcodeCompiler::
 
   checkError(ltoObj->run(
       [&](size_t task) {
-        return llvm::make_unique<lto::NativeObjectStream>(
-            llvm::make_unique<raw_svector_ostream>(buf[task]));
+        return std::make_unique<lto::NativeObjectStream>(
+            std::make_unique<raw_svector_ostream>(buf[task]));
       },
       cache));
 




More information about the llvm-commits mailing list