diff options
author | Zachary Turner <zturner@google.com> | 2015-02-10 23:46:48 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-02-10 23:46:48 +0000 |
commit | be6d1e49b0c58b5a28f0c8ca1e536c1157ca5666 (patch) | |
tree | b7b687c0fcedc06fa897907680ac304367ee0a12 /llvm | |
parent | 08fc9e9158174f841b3e2360ff96fc9ca7c595ec (diff) | |
download | bcm5719-llvm-be6d1e49b0c58b5a28f0c8ca1e536c1157ca5666.tar.gz bcm5719-llvm-be6d1e49b0c58b5a28f0c8ca1e536c1157ca5666.zip |
Convert std::make_unique<> to llvm::make_unique<>.
llvm-svn: 228768
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp | 9 | ||||
-rw-r--r-- | llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp | 14 | ||||
-rw-r--r-- | llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp | 4 |
3 files changed, 14 insertions, 13 deletions
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<DIAEnumSymbols>(Session, DiaEnumerator); + return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); } std::unique_ptr<IPDBEnumSymbols> @@ -293,7 +294,7 @@ DIARawSymbol::findChildren(PDB_SymType Type, StringRef Name, Symbol->findChildren(EnumVal, Name16Str, CompareFlags, &DiaEnumerator)) return nullptr; - return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); + return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); } std::unique_ptr<IPDBEnumSymbols> @@ -312,7 +313,7 @@ DIARawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name, &DiaEnumerator)) return nullptr; - return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); + return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); } std::unique_ptr<IPDBEnumSymbols> @@ -321,7 +322,7 @@ DIARawSymbol::findInlineFramesByRVA(uint32_t RVA) const { if (S_OK != Symbol->findInlineFramesByRVA(RVA, &DiaEnumerator)) return nullptr; - return std::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); + return llvm::make_unique<DIAEnumSymbols>(Session, DiaEnumerator); } void DIARawSymbol::getDataBytes(llvm::SmallVector<uint8_t, 32> &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<PDBSymbolExe> DIASession::getGlobalScope() const { if (S_OK != Session->get_globalScope(&GlobalScope)) return nullptr; - auto RawSymbol = std::make_unique<DIARawSymbol>(*this, GlobalScope); + auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, GlobalScope); auto PdbSymbol(PDBSymbol::create(*this, std::move(RawSymbol))); std::unique_ptr<PDBSymbolExe> ExeSymbol( static_cast<PDBSymbolExe *>(PdbSymbol.release())); @@ -74,7 +75,7 @@ std::unique_ptr<PDBSymbol> DIASession::getSymbolById(uint32_t SymbolId) const { if (S_OK != Session->symbolById(SymbolId, &LocatedSymbol)) return nullptr; - auto RawSymbol = std::make_unique<DIARawSymbol>(*this, LocatedSymbol); + auto RawSymbol = llvm::make_unique<DIARawSymbol>(*this, LocatedSymbol); return PDBSymbol::create(*this, std::move(RawSymbol)); } @@ -83,7 +84,7 @@ std::unique_ptr<IPDBEnumSourceFiles> DIASession::getAllSourceFiles() const { if (S_OK != Session->findFile(nullptr, nullptr, nsNone, &Files)) return nullptr; - return std::make_unique<DIAEnumSourceFiles>(*this, Files); + return llvm::make_unique<DIAEnumSourceFiles>(*this, Files); } std::unique_ptr<IPDBEnumSourceFiles> DIASession::getSourceFilesForCompiland( @@ -96,7 +97,7 @@ std::unique_ptr<IPDBEnumSourceFiles> DIASession::getSourceFilesForCompiland( Session->findFile(RawSymbol.getDiaSymbol(), nullptr, nsNone, &Files)) return nullptr; - return std::make_unique<DIAEnumSourceFiles>(*this, Files); + return llvm::make_unique<DIAEnumSourceFiles>(*this, Files); } std::unique_ptr<IPDBSourceFile> @@ -105,7 +106,7 @@ DIASession::getSourceFileById(uint32_t FileId) const { if (S_OK != Session->findFileById(FileId, &LocatedFile)) return nullptr; - return std::make_unique<DIASourceFile>(*this, LocatedFile); + return llvm::make_unique<DIASourceFile>(*this, LocatedFile); } std::unique_ptr<IPDBEnumDataStreams> DIASession::getDebugStreams() const { @@ -113,6 +114,5 @@ std::unique_ptr<IPDBEnumDataStreams> DIASession::getDebugStreams() const { if (S_OK != Session->getEnumDebugStreams(&DiaEnumerator)) return nullptr; - return std::unique_ptr<IPDBEnumDataStreams>( - new DIAEnumDebugStreams(DiaEnumerator)); + return llvm::make_unique<DIAEnumDebugStreams>(DiaEnumerator); } diff --git a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp index 1917097c783..ba2024b36f6 100644 --- a/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp +++ b/llvm/unittests/DebugInfo/PDB/PDBApiTest.cpp @@ -7,9 +7,9 @@ // //===----------------------------------------------------------------------===// -#include <memory> #include <unordered_map> +#include "llvm/ADT/STLExtras.h" #include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" #include "llvm/DebugInfo/PDB/IPDBSession.h" @@ -339,7 +339,7 @@ private: std::unique_ptr<IPDBSession> Session; void InsertItemWithTag(PDB_SymType Tag) { - auto RawSymbol = std::make_unique<MockRawSymbol>(*Session, Tag); + auto RawSymbol = llvm::make_unique<MockRawSymbol>(*Session, Tag); auto Symbol = PDBSymbol::create(*Session, std::move(RawSymbol)); SymbolMap.insert(std::make_pair(Tag, std::move(Symbol))); } |