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/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp | 4 ++-- llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp | 4 ++-- llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp | 8 ++++---- llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'llvm/unittests/DebugInfo') diff --git a/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp b/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp index ff01ef7e739..7a4000d9613 100644 --- a/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp +++ b/llvm/unittests/DebugInfo/CodeView/RandomAccessVisitorTest.cpp @@ -88,7 +88,7 @@ public: RandomAccessVisitorTest() {} static void SetUpTestCase() { - GlobalState = llvm::make_unique(); + GlobalState = std::make_unique(); AppendingTypeTableBuilder Builder(GlobalState->Allocator); @@ -120,7 +120,7 @@ public: static void TearDownTestCase() { GlobalState.reset(); } void SetUp() override { - TestState = llvm::make_unique(); + TestState = std::make_unique(); } void TearDown() override { TestState.reset(); } diff --git a/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp b/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp index d011db9fcd4..e00240d7427 100644 --- a/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp +++ b/llvm/unittests/DebugInfo/CodeView/TypeIndexDiscoveryTest.cpp @@ -25,8 +25,8 @@ public: void SetUp() override { Refs.clear(); - TTB = make_unique(Storage); - CRB = make_unique(); + TTB = std::make_unique(Storage); + CRB = std::make_unique(); Symbols.clear(); } diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp index d2c0f3c3b20..2e062e8fe96 100644 --- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp @@ -446,7 +446,7 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) { return make_error("no code emitter for target " + TripleName, inconvertibleErrorCode()); - Stream = make_unique(FileBytes); + Stream = std::make_unique(FileBytes); MS = TheTarget->createMCObjectStreamer( TheTriple, *MC, std::unique_ptr(MAB), @@ -469,7 +469,7 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) { MC->setDwarfVersion(Version); Asm->setDwarfVersion(Version); - StringPool = llvm::make_unique(Allocator, *Asm, StringRef()); + StringPool = std::make_unique(Allocator, *Asm, StringRef()); StringOffsetsStartSym = Asm->createTempSymbol("str_offsets_base"); return Error::success(); @@ -541,12 +541,12 @@ bool dwarfgen::Generator::saveFile(StringRef Path) { dwarfgen::CompileUnit &dwarfgen::Generator::addCompileUnit() { CompileUnits.push_back( - make_unique(*this, Version, Asm->getPointerSize())); + std::make_unique(*this, Version, Asm->getPointerSize())); return *CompileUnits.back(); } dwarfgen::LineTable &dwarfgen::Generator::addLineTable(DwarfFormat Format) { LineTables.push_back( - make_unique(Version, Format, Asm->getPointerSize())); + std::make_unique(Version, Format, Asm->getPointerSize())); return *LineTables.back(); } diff --git a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp index 766f54d5206..f48e8379046 100644 --- a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp +++ b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp @@ -464,7 +464,7 @@ private: std::unique_ptr Session; void InsertItemWithTag(PDB_SymType Tag) { - auto RawSymbol = llvm::make_unique(Tag); + auto RawSymbol = std::make_unique(Tag); auto Symbol = PDBSymbol::create(*Session, std::move(RawSymbol)); SymbolMap.insert(std::make_pair(Tag, std::move(Symbol))); } -- cgit v1.2.3