[llvm] r250177 - Fix a couple of comments; NFC
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 09:35:59 PDT 2015
Author: davidxl
Date: Tue Oct 13 11:35:59 2015
New Revision: 250177
URL: http://llvm.org/viewvc/llvm-project?rev=250177&view=rev
Log:
Fix a couple of comments; NFC
Modified:
llvm/trunk/lib/ProfileData/InstrProfReader.cpp
Modified: llvm/trunk/lib/ProfileData/InstrProfReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProfReader.cpp?rev=250177&r1=250176&r2=250177&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProfReader.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProfReader.cpp Tue Oct 13 11:35:59 2015
@@ -369,20 +369,20 @@ data_type InstrProfLookupTrait::ReadData
using namespace support;
const unsigned char *End = D + N;
while (D < End) {
- // Read hash
+ // Read hash.
if (D + sizeof(uint64_t) >= End)
return data_type();
uint64_t Hash = endian::readNext<uint64_t, little, unaligned>(D);
- // Initialize number of counters for FormatVersion == 1
+ // Initialize number of counters for FormatVersion == 1.
uint64_t CountsSize = N / sizeof(uint64_t) - 1;
- // If format version is different then read number of counters
+ // If format version is different then read the number of counters.
if (FormatVersion != 1) {
if (D + sizeof(uint64_t) > End)
return data_type();
CountsSize = endian::readNext<uint64_t, little, unaligned>(D);
}
- // Read counter values
+ // Read counter values.
if (D + CountsSize * sizeof(uint64_t) > End)
return data_type();
@@ -393,7 +393,7 @@ data_type InstrProfLookupTrait::ReadData
DataBuffer.push_back(InstrProfRecord(K, Hash, std::move(CounterBuffer)));
- // Read value profiling data
+ // Read value profiling data.
if (FormatVersion > 2 && !ReadValueProfilingData(D, End)) {
DataBuffer.clear();
return data_type();
@@ -408,7 +408,7 @@ bool IndexedInstrProfReader::hasFormat(c
using namespace support;
uint64_t Magic =
endian::read<uint64_t, little, aligned>(DataBuffer.getBufferStart());
- // verify that it's magical
+ // Verify that it's magical.
return Magic == IndexedInstrProf::Magic;
}
More information about the llvm-commits
mailing list