From be6d1e49b0c58b5a28f0c8ca1e536c1157ca5666 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 10 Feb 2015 23:46:48 +0000 Subject: Convert std::make_unique<> to llvm::make_unique<>. llvm-svn: 228768 --- llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp | 9 +++++---- llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp | 14 +++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'llvm/lib/DebugInfo') diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp index 5c94f6e16ea..268f8329349 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/PDB/PDBExtras.h" #include "llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h" #include "llvm/DebugInfo/PDB/DIA/DIARawSymbol.h" @@ -275,7 +276,7 @@ DIARawSymbol::findChildren(PDB_SymType Type) const { if (S_OK != Symbol->findChildren(EnumVal, nullptr, nsNone, &DiaEnumerator)) return nullptr; - return std::make_unique(Session, DiaEnumerator); + return llvm::make_unique(Session, DiaEnumerator); } std::unique_ptr @@ -293,7 +294,7 @@ DIARawSymbol::findChildren(PDB_SymType Type, StringRef Name, Symbol->findChildren(EnumVal, Name16Str, CompareFlags, &DiaEnumerator)) return nullptr; - return std::make_unique(Session, DiaEnumerator); + return llvm::make_unique(Session, DiaEnumerator); } std::unique_ptr @@ -312,7 +313,7 @@ DIARawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name, &DiaEnumerator)) return nullptr; - return std::make_unique(Session, DiaEnumerator); + return llvm::make_unique(Session, DiaEnumerator); } std::unique_ptr @@ -321,7 +322,7 @@ DIARawSymbol::findInlineFramesByRVA(uint32_t RVA) const { if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator)) return nullptr; - return std::make_unique(Session, DiaEnumerator); + return llvm::make_unique(Session, DiaEnumerator); } void DIARawSymbol::getDataBytes(llvm::SmallVector &bytes) const { diff --git a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp index 0df2354e018..fed6da81171 100644 --- a/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp +++ b/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/PDB/PDBSymbolCompiland.h" #include "llvm/DebugInfo/PDB/PDBSymbolExe.h" @@ -62,7 +63,7 @@ std::unique_ptr DIASession::getGlobalScope() const { if (S_OK != Session->get_globalScope(&GlobalScope)) return nullptr; - auto RawSymbol = std::make_unique(*this, GlobalScope); + auto RawSymbol = llvm::make_unique(*this, GlobalScope); auto PdbSymbol(PDBSymbol::create(*this, std::move(RawSymbol))); std::unique_ptr ExeSymbol( static_cast(PdbSymbol.release())); @@ -74,7 +75,7 @@ std::unique_ptr DIASession::getSymbolById(uint32_t SymbolId) const { if (S_OK != Session->symbolById(SymbolId, &LocatedSymbol)) return nullptr; - auto RawSymbol = std::make_unique(*this, LocatedSymbol); + auto RawSymbol = llvm::make_unique(*this, LocatedSymbol); return PDBSymbol::create(*this, std::move(RawSymbol)); } @@ -83,7 +84,7 @@ std::unique_ptr DIASession::getAllSourceFiles() const { if (S_OK != Session->findFile(nullptr, nullptr, nsNone, &Files)) return nullptr; - return std::make_unique(*this, Files); + return llvm::make_unique(*this, Files); } std::unique_ptr DIASession::getSourceFilesForCompiland( @@ -96,7 +97,7 @@ std::unique_ptr DIASession::getSourceFilesForCompiland( Session->findFile(RawSymbol.getDiaSymbol(), nullptr, nsNone, &Files)) return nullptr; - return std::make_unique(*this, Files); + return llvm::make_unique(*this, Files); } std::unique_ptr @@ -105,7 +106,7 @@ DIASession::getSourceFileById(uint32_t FileId) const { if (S_OK != Session->findFileById(FileId, &LocatedFile)) return nullptr; - return std::make_unique(*this, LocatedFile); + return llvm::make_unique(*this, LocatedFile); } std::unique_ptr DIASession::getDebugStreams() const { @@ -113,6 +114,5 @@ std::unique_ptr DIASession::getDebugStreams() const { if (S_OK != Session->getEnumDebugStreams(&DiaEnumerator)) return nullptr; - return std::unique_ptr( - new DIAEnumDebugStreams(DiaEnumerator)); + return llvm::make_unique(DiaEnumerator); } -- cgit v1.2.3