[llvm] r228768 - Convert std::make_unique<> to llvm::make_unique<>.
Zachary Turner
zturner at google.com
Tue Feb 10 15:46:48 PST 2015
Author: zturner
Date: Tue Feb 10 17:46:48 2015
New Revision: 228768
URL: http://llvm.org/viewvc/llvm-project?rev=228768&view=rev
Log:
Convert std::make_unique<> to llvm::make_unique<>.
Modified:
llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp
llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp?rev=228768&r1=228767&r2=228768&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp Tue Feb 10 17:46:48 2015
@@ -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 T
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 T
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_SymT
&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(uint
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 {
Modified: llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp?rev=228768&r1=228767&r2=228768&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/DIA/DIASession.cpp Tue Feb 10 17:46:48 2015
@@ -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
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::g
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> DIA
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> DIA
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 F
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> DIA
if (S_OK != Session->getEnumDebugStreams(&DiaEnumerator))
return nullptr;
- return std::unique_ptr<IPDBEnumDataStreams>(
- new DIAEnumDebugStreams(DiaEnumerator));
+ return llvm::make_unique<DIAEnumDebugStreams>(DiaEnumerator);
}
Modified: llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp?rev=228768&r1=228767&r2=228768&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/PDB/PDBApiTest.cpp Tue Feb 10 17:46:48 2015
@@ -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)));
}
More information about the llvm-commits
mailing list