Convert std::make_unique<> to llvm::make_unique<>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228768 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zachary Turner 2015-02-10 23:46:48 +00:00
parent 27a610ae36
commit ab884fa603
3 changed files with 14 additions and 13 deletions

View File

@ -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 {

View File

@ -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);
}

View File

@ -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)));
}