diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 15:54:37 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 15:54:37 +0000 |
commit | 0eaee545eef49ff9498234d3a51a5cbde59bf976 (patch) | |
tree | fd7691e102022fb97622c5485fa8c4f506fc124e /llvm/lib/ProfileData/InstrProfReader.cpp | |
parent | 1c34d10776828c0756ff4f0b2b9aa8bda2be348a (diff) | |
download | llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.zip llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.gz llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/ProfileData/InstrProfReader.cpp')
-rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index fec1c15..b97601c 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)))); } |