diff options
Diffstat (limited to 'llvm/lib/ProfileData')
-rw-r--r-- | llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/ProfileData/GCOV.cpp | 12 | ||||
-rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 14 | ||||
-rw-r--r-- | llvm/lib/ProfileData/ProfileSummaryBuilder.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/ProfileData/SampleProfReader.cpp | 4 |
5 files changed, 20 insertions, 20 deletions
diff --git a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp index e70bc318b84..4e0b911c142 100644 --- a/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp @@ -539,7 +539,7 @@ Expected<std::unique_ptr<CovMapFuncRecordReader>> CovMapFuncRecordReader::get( switch (Version) { case CovMapVersion::Version1: - return llvm::make_unique<VersionedCovMapFuncRecordReader< + return std::make_unique<VersionedCovMapFuncRecordReader< CovMapVersion::Version1, IntPtrT, Endian>>(P, R, F); case CovMapVersion::Version2: case CovMapVersion::Version3: @@ -547,10 +547,10 @@ Expected<std::unique_ptr<CovMapFuncRecordReader>> CovMapFuncRecordReader::get( if (Error E = P.create(P.getNameData())) return std::move(E); if (Version == CovMapVersion::Version2) - return llvm::make_unique<VersionedCovMapFuncRecordReader< + return std::make_unique<VersionedCovMapFuncRecordReader< CovMapVersion::Version2, IntPtrT, Endian>>(P, R, F); else - return llvm::make_unique<VersionedCovMapFuncRecordReader< + return std::make_unique<VersionedCovMapFuncRecordReader< CovMapVersion::Version3, IntPtrT, Endian>>(P, R, F); } llvm_unreachable("Unsupported version"); diff --git a/llvm/lib/ProfileData/GCOV.cpp b/llvm/lib/ProfileData/GCOV.cpp index 47c8cfbbf4d..00e6294c57a 100644 --- a/llvm/lib/ProfileData/GCOV.cpp +++ b/llvm/lib/ProfileData/GCOV.cpp @@ -40,7 +40,7 @@ bool GCOVFile::readGCNO(GCOVBuffer &Buffer) { while (true) { if (!Buffer.readFunctionTag()) break; - auto GFun = make_unique<GCOVFunction>(*this); + auto GFun = std::make_unique<GCOVFunction>(*this); if (!GFun->readGCNO(Buffer, Version)) return false; Functions.push_back(std::move(GFun)); @@ -164,7 +164,7 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) { for (uint32_t i = 0, e = BlockCount; i != e; ++i) { if (!Buff.readInt(Dummy)) return false; // Block flags; - Blocks.push_back(make_unique<GCOVBlock>(*this, i)); + Blocks.push_back(std::make_unique<GCOVBlock>(*this, i)); } // read edges. @@ -185,7 +185,7 @@ bool GCOVFunction::readGCNO(GCOVBuffer &Buff, GCOV::GCOVVersion Version) { uint32_t Dst; if (!Buff.readInt(Dst)) return false; - Edges.push_back(make_unique<GCOVEdge>(*Blocks[BlockNo], *Blocks[Dst])); + Edges.push_back(std::make_unique<GCOVEdge>(*Blocks[BlockNo], *Blocks[Dst])); GCOVEdge *Edge = Edges.back().get(); Blocks[BlockNo]->addDstEdge(Edge); Blocks[Dst]->addSrcEdge(Edge); @@ -702,14 +702,14 @@ std::string FileInfo::getCoveragePath(StringRef Filename, std::unique_ptr<raw_ostream> FileInfo::openCoveragePath(StringRef CoveragePath) { if (Options.NoOutput) - return llvm::make_unique<raw_null_ostream>(); + return std::make_unique<raw_null_ostream>(); std::error_code EC; auto OS = - llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::OF_Text); + std::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::OF_Text); if (EC) { errs() << EC.message() << "\n"; - return llvm::make_unique<raw_null_ostream>(); + return std::make_unique<raw_null_ostream>(); } return std::move(OS); } diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index fec1c152991..b97601ce172 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -119,7 +119,7 @@ IndexedInstrProfReader::create(std::unique_ptr<MemoryBuffer> Buffer, // Create the reader. if (!IndexedInstrProfReader::hasFormat(*Buffer)) return make_error<InstrProfError>(instrprof_error::bad_magic); - auto Result = llvm::make_unique<IndexedInstrProfReader>( + auto Result = std::make_unique<IndexedInstrProfReader>( std::move(Buffer), std::move(RemappingBuffer)); // Initialize the reader and return the result. @@ -385,7 +385,7 @@ Error RawInstrProfReader<IntPtrT>::readHeader( NamesStart = Start + NamesOffset; ValueDataStart = reinterpret_cast<const uint8_t *>(Start + ValueDataOffset); - std::unique_ptr<InstrProfSymtab> NewSymtab = make_unique<InstrProfSymtab>(); + std::unique_ptr<InstrProfSymtab> NewSymtab = std::make_unique<InstrProfSymtab>(); if (Error E = createSymtab(*NewSymtab.get())) return E; @@ -767,7 +767,7 @@ IndexedInstrProfReader::readSummary(IndexedInstrProf::ProfVersion Version, UseCS ? this->CS_Summary : this->Summary; // initialize InstrProfSummary using the SummaryData from disk. - Summary = llvm::make_unique<ProfileSummary>( + Summary = std::make_unique<ProfileSummary>( UseCS ? ProfileSummary::PSK_CSInstr : ProfileSummary::PSK_Instr, DetailedSummary, SummaryData->get(Summary::TotalBlockCount), SummaryData->get(Summary::MaxBlockCount), @@ -827,18 +827,18 @@ Error IndexedInstrProfReader::readHeader() { // The rest of the file is an on disk hash table. auto IndexPtr = - llvm::make_unique<InstrProfReaderIndex<OnDiskHashTableImplV3>>( + std::make_unique<InstrProfReaderIndex<OnDiskHashTableImplV3>>( Start + HashOffset, Cur, Start, HashType, FormatVersion); // Load the remapping table now if requested. if (RemappingBuffer) { - Remapper = llvm::make_unique< + Remapper = std::make_unique< InstrProfReaderItaniumRemapper<OnDiskHashTableImplV3>>( std::move(RemappingBuffer), *IndexPtr); if (Error E = Remapper->populateRemappings()) return E; } else { - Remapper = llvm::make_unique<InstrProfReaderNullRemapper>(*IndexPtr); + Remapper = std::make_unique<InstrProfReaderNullRemapper>(*IndexPtr); } Index = std::move(IndexPtr); @@ -849,7 +849,7 @@ InstrProfSymtab &IndexedInstrProfReader::getSymtab() { if (Symtab.get()) return *Symtab.get(); - std::unique_ptr<InstrProfSymtab> NewSymtab = make_unique<InstrProfSymtab>(); + std::unique_ptr<InstrProfSymtab> NewSymtab = std::make_unique<InstrProfSymtab>(); if (Error E = Index->populateSymtab(*NewSymtab.get())) { consumeError(error(InstrProfError::take(std::move(E)))); } diff --git a/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp b/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp index 4d5b0093574..3299b5f9206 100644 --- a/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp +++ b/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp @@ -93,14 +93,14 @@ void ProfileSummaryBuilder::computeDetailedSummary() { std::unique_ptr<ProfileSummary> SampleProfileSummaryBuilder::getSummary() { computeDetailedSummary(); - return llvm::make_unique<ProfileSummary>( + return std::make_unique<ProfileSummary>( ProfileSummary::PSK_Sample, DetailedSummary, TotalCount, MaxCount, 0, MaxFunctionCount, NumCounts, NumFunctions); } std::unique_ptr<ProfileSummary> InstrProfSummaryBuilder::getSummary() { computeDetailedSummary(); - return llvm::make_unique<ProfileSummary>( + return std::make_unique<ProfileSummary>( ProfileSummary::PSK_Instr, DetailedSummary, TotalCount, MaxCount, MaxInternalBlockCount, MaxFunctionCount, NumCounts, NumFunctions); } diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp index 659d6db6c6f..2bac3e92cb0 100644 --- a/llvm/lib/ProfileData/SampleProfReader.cpp +++ b/llvm/lib/ProfileData/SampleProfReader.cpp @@ -660,7 +660,7 @@ std::error_code SampleProfileReaderBinary::readSummary() { if (EC != sampleprof_error::success) return EC; } - Summary = llvm::make_unique<ProfileSummary>( + Summary = std::make_unique<ProfileSummary>( ProfileSummary::PSK_Sample, Entries, *TotalCount, *MaxBlockCount, 0, *MaxFunctionCount, *NumBlocks, *NumFunctions); @@ -1007,7 +1007,7 @@ SampleProfileReaderItaniumRemapper::create( auto BufferOrError = setupMemoryBuffer(Filename); if (std::error_code EC = BufferOrError.getError()) return EC; - return llvm::make_unique<SampleProfileReaderItaniumRemapper>( + return std::make_unique<SampleProfileReaderItaniumRemapper>( std::move(BufferOrError.get()), C, std::move(Underlying)); } |