From 0eaee545eef49ff9498234d3a51a5cbde59bf976 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 15 Aug 2019 15:54:37 +0000 Subject: [llvm] 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. llvm-svn: 369013 --- llvm/tools/llvm-objcopy/ELF/Object.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/tools/llvm-objcopy/ELF/Object.cpp') diff --git a/llvm/tools/llvm-objcopy/ELF/Object.cpp b/llvm/tools/llvm-objcopy/ELF/Object.cpp index 2d85b3a..2862af1 100644 --- a/llvm/tools/llvm-objcopy/ELF/Object.cpp +++ b/llvm/tools/llvm-objcopy/ELF/Object.cpp @@ -665,7 +665,7 @@ void SymbolTableSection::addSymbol(Twine Name, uint8_t Bind, uint8_t Type, Sym.Visibility = Visibility; Sym.Size = SymbolSize; Sym.Index = Symbols.size(); - Symbols.emplace_back(llvm::make_unique(Sym)); + Symbols.emplace_back(std::make_unique(Sym)); Size += this->EntrySize; } @@ -1645,7 +1645,7 @@ std::unique_ptr IHexReader::create() const { } std::unique_ptr ELFReader::create() const { - auto Obj = llvm::make_unique(); + auto Obj = std::make_unique(); if (auto *O = dyn_cast>(Bin)) { ELFBuilder Builder(*O, *Obj, ExtractPartition); Builder.build(); @@ -2076,7 +2076,7 @@ template Error ELFWriter::finalize() { // Also, the output arch may not be the same as the input arch, so fix up // size-related fields before doing layout calculations. uint64_t Index = 0; - auto SecSizer = llvm::make_unique>(); + auto SecSizer = std::make_unique>(); for (auto &Sec : Obj.sections()) { Sec.Index = Index++; Sec.accept(*SecSizer); @@ -2114,7 +2114,7 @@ template Error ELFWriter::finalize() { if (Error E = Buf.allocate(totalSize())) return E; - SecWriter = llvm::make_unique>(Buf); + SecWriter = std::make_unique>(Buf); return Error::success(); } @@ -2200,7 +2200,7 @@ Error BinaryWriter::finalize() { if (Error E = Buf.allocate(TotalSize)) return E; - SecWriter = llvm::make_unique(Buf); + SecWriter = std::make_unique(Buf); return Error::success(); } -- cgit v1.1