diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-21 20:42:34 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-21 20:42:34 +0000 |
| commit | 4c5b7cb1fca96d354d355aa633c1bf2f2da76ea4 (patch) | |
| tree | a068036eef80cc66fa296640f9e1981cabacb052 /llvm/lib | |
| parent | 09a67f45eeaabe9e0ce021ac329e19fed1feb79f (diff) | |
| download | bcm5719-llvm-4c5b7cb1fca96d354d355aa633c1bf2f2da76ea4.tar.gz bcm5719-llvm-4c5b7cb1fca96d354d355aa633c1bf2f2da76ea4.zip | |
InstrProf: Use move semantics with unique_ptr
<rdar://problem/15950346>
llvm-svn: 204512
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index c317a457bb6..a95d9bc3b08 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -31,9 +31,9 @@ error_code InstrProfReader::create(std::string Path, // Create the reader. if (RawInstrProfReader::hasFormat(*Buffer)) - Result.reset(new RawInstrProfReader(Buffer)); + Result.reset(new RawInstrProfReader(std::move(Buffer))); else - Result.reset(new TextInstrProfReader(Buffer)); + Result.reset(new TextInstrProfReader(std::move(Buffer))); // Read the header and return the result. return Result->readHeader(); @@ -85,8 +85,8 @@ error_code TextInstrProfReader::readNextRecord(InstrProfRecord &Record) { return success(); } -RawInstrProfReader::RawInstrProfReader(std::unique_ptr<MemoryBuffer> &DataBuffer) - : DataBuffer(DataBuffer.release()) { } +RawInstrProfReader::RawInstrProfReader(std::unique_ptr<MemoryBuffer> DataBuffer) + : DataBuffer(std::move(DataBuffer)) { } static uint64_t getRawMagic() { return |

