[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
This commit is contained in:
@@ -5874,7 +5874,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
ArrayRef<uint64_t>(Record).slice(CallGraphEdgeStartIndex),
|
||||
IsOldProfileFormat, HasProfile, HasRelBF);
|
||||
setSpecialRefs(Refs, NumRORefs, NumWORefs);
|
||||
auto FS = llvm::make_unique<FunctionSummary>(
|
||||
auto FS = std::make_unique<FunctionSummary>(
|
||||
Flags, InstCount, getDecodedFFlags(RawFunFlags), /*EntryCount=*/0,
|
||||
std::move(Refs), std::move(Calls), std::move(PendingTypeTests),
|
||||
std::move(PendingTypeTestAssumeVCalls),
|
||||
@@ -5900,7 +5900,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
uint64_t RawFlags = Record[1];
|
||||
unsigned AliaseeID = Record[2];
|
||||
auto Flags = getDecodedGVSummaryFlags(RawFlags, Version);
|
||||
auto AS = llvm::make_unique<AliasSummary>(Flags);
|
||||
auto AS = std::make_unique<AliasSummary>(Flags);
|
||||
// The module path string ref set in the summary must be owned by the
|
||||
// index's module string table. Since we don't have a module path
|
||||
// string table section in the per-module index, we create a single
|
||||
@@ -5934,7 +5934,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
std::vector<ValueInfo> Refs =
|
||||
makeRefList(ArrayRef<uint64_t>(Record).slice(RefArrayStart));
|
||||
auto FS =
|
||||
llvm::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
|
||||
std::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
|
||||
FS->setModulePath(getThisModule()->first());
|
||||
auto GUID = getValueInfoFromValueId(ValueID);
|
||||
FS->setOriginalName(GUID.second);
|
||||
@@ -5961,7 +5961,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
VTableFuncs.push_back({Callee, Offset});
|
||||
}
|
||||
auto VS =
|
||||
llvm::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
|
||||
std::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
|
||||
VS->setModulePath(getThisModule()->first());
|
||||
VS->setVTableFuncs(VTableFuncs);
|
||||
auto GUID = getValueInfoFromValueId(ValueID);
|
||||
@@ -6019,7 +6019,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
IsOldProfileFormat, HasProfile, false);
|
||||
ValueInfo VI = getValueInfoFromValueId(ValueID).first;
|
||||
setSpecialRefs(Refs, NumRORefs, NumWORefs);
|
||||
auto FS = llvm::make_unique<FunctionSummary>(
|
||||
auto FS = std::make_unique<FunctionSummary>(
|
||||
Flags, InstCount, getDecodedFFlags(RawFunFlags), EntryCount,
|
||||
std::move(Refs), std::move(Edges), std::move(PendingTypeTests),
|
||||
std::move(PendingTypeTestAssumeVCalls),
|
||||
@@ -6046,7 +6046,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
uint64_t RawFlags = Record[2];
|
||||
unsigned AliaseeValueId = Record[3];
|
||||
auto Flags = getDecodedGVSummaryFlags(RawFlags, Version);
|
||||
auto AS = llvm::make_unique<AliasSummary>(Flags);
|
||||
auto AS = std::make_unique<AliasSummary>(Flags);
|
||||
LastSeenSummary = AS.get();
|
||||
AS->setModulePath(ModuleIdMap[ModuleId]);
|
||||
|
||||
@@ -6075,7 +6075,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
std::vector<ValueInfo> Refs =
|
||||
makeRefList(ArrayRef<uint64_t>(Record).slice(RefArrayStart));
|
||||
auto FS =
|
||||
llvm::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
|
||||
std::make_unique<GlobalVarSummary>(Flags, GVF, std::move(Refs));
|
||||
LastSeenSummary = FS.get();
|
||||
FS->setModulePath(ModuleIdMap[ModuleId]);
|
||||
ValueInfo VI = getValueInfoFromValueId(ValueID).first;
|
||||
@@ -6438,7 +6438,7 @@ BitcodeModule::getModuleImpl(LLVMContext &Context, bool MaterializeAll,
|
||||
Context);
|
||||
|
||||
std::unique_ptr<Module> M =
|
||||
llvm::make_unique<Module>(ModuleIdentifier, Context);
|
||||
std::make_unique<Module>(ModuleIdentifier, Context);
|
||||
M->setMaterializer(R);
|
||||
|
||||
// Delay parsing Metadata if ShouldLazyLoadMetadata is true.
|
||||
@@ -6485,7 +6485,7 @@ Expected<std::unique_ptr<ModuleSummaryIndex>> BitcodeModule::getSummary() {
|
||||
if (Error JumpFailed = Stream.JumpToBit(ModuleBit))
|
||||
return std::move(JumpFailed);
|
||||
|
||||
auto Index = llvm::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
|
||||
auto Index = std::make_unique<ModuleSummaryIndex>(/*HaveGVs=*/false);
|
||||
ModuleSummaryIndexBitcodeReader R(std::move(Stream), Strtab, *Index,
|
||||
ModuleIdentifier, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user