From f747d124daab9f732b6693f7b45a1abf213282b7 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 13 Oct 2015 16:35:59 +0000 Subject: [PATCH] Fix a couple of comments; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250177 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ProfileData/InstrProfReader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index bda134fe3db..8ad50615a25 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -369,20 +369,20 @@ data_type InstrProfLookupTrait::ReadData(StringRef K, const unsigned char *D, 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(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(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(StringRef K, const unsigned char *D, 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(const MemoryBuffer &DataBuffer) { using namespace support; uint64_t Magic = endian::read(DataBuffer.getBufferStart()); - // verify that it's magical + // Verify that it's magical. return Magic == IndexedInstrProf::Magic; } -- 2.34.1