[llvm] r257744 - Cleanup: shorten prefix to consistent with other decls /NFC

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 22:21:25 PST 2016


Author: davidxl
Date: Thu Jan 14 00:21:25 2016
New Revision: 257744

URL: http://llvm.org/viewvc/llvm-project?rev=257744&view=rev
Log:
Cleanup: shorten prefix to consistent with other decls /NFC

Modified:
    llvm/trunk/include/llvm/ProfileData/CoverageMapping.h
    llvm/trunk/include/llvm/ProfileData/CoverageMappingReader.h
    llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
    llvm/trunk/lib/ProfileData/CoverageMappingReader.cpp

Modified: llvm/trunk/include/llvm/ProfileData/CoverageMapping.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/CoverageMapping.h?rev=257744&r1=257743&r2=257744&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/CoverageMapping.h (original)
+++ llvm/trunk/include/llvm/ProfileData/CoverageMapping.h Thu Jan 14 00:21:25 2016
@@ -537,10 +537,10 @@ struct CovMapHeader {
 
 LLVM_PACKED_END
 
-enum CoverageMappingVersion {
-  CoverageMappingVersion1 = 0,
-  // The current versin is Version1
-  CoverageMappingCurrentVersion = INSTR_PROF_COVMAP_VERSION
+enum CovMapVersion {
+  Version1 = 0,
+  // The current version is Version1
+  CurrentVersion = INSTR_PROF_COVMAP_VERSION
 };
 
 template <int CovMapVersion, class IntPtrT> struct CovMapTraits {

Modified: llvm/trunk/include/llvm/ProfileData/CoverageMappingReader.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/CoverageMappingReader.h?rev=257744&r1=257743&r2=257744&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/CoverageMappingReader.h (original)
+++ llvm/trunk/include/llvm/ProfileData/CoverageMappingReader.h Thu Jan 14 00:21:25 2016
@@ -140,14 +140,14 @@ private:
 class BinaryCoverageReader : public CoverageMappingReader {
 public:
   struct ProfileMappingRecord {
-    CoverageMappingVersion Version;
+    CovMapVersion Version;
     StringRef FunctionName;
     uint64_t FunctionHash;
     StringRef CoverageMapping;
     size_t FilenamesBegin;
     size_t FilenamesSize;
 
-    ProfileMappingRecord(CoverageMappingVersion Version, StringRef FunctionName,
+    ProfileMappingRecord(CovMapVersion Version, StringRef FunctionName,
                          uint64_t FunctionHash, StringRef CoverageMapping,
                          size_t FilenamesBegin, size_t FilenamesSize)
         : Version(Version), FunctionName(FunctionName),

Modified: llvm/trunk/include/llvm/ProfileData/InstrProfData.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProfData.inc?rev=257744&r1=257743&r2=257744&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProfData.inc (original)
+++ llvm/trunk/include/llvm/ProfileData/InstrProfData.inc Thu Jan 14 00:21:25 2016
@@ -182,7 +182,7 @@ COVMAP_HEADER(uint32_t, Int32Ty, Filenam
 COVMAP_HEADER(uint32_t, Int32Ty, CoverageSize, \
               llvm::ConstantInt::get(Int32Ty, CoverageMappingSize))
 COVMAP_HEADER(uint32_t, Int32Ty, Version, \
-              llvm::ConstantInt::get(Int32Ty, CoverageMappingCurrentVersion))
+              llvm::ConstantInt::get(Int32Ty, CovMapVersion::CurrentVersion))
 #undef COVMAP_HEADER
 /* COVMAP_HEADER end.  */
 

Modified: llvm/trunk/lib/ProfileData/CoverageMappingReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/CoverageMappingReader.cpp?rev=257744&r1=257743&r2=257744&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/CoverageMappingReader.cpp (original)
+++ llvm/trunk/lib/ProfileData/CoverageMappingReader.cpp Thu Jan 14 00:21:25 2016
@@ -316,13 +316,13 @@ struct CovMapFuncRecordReader {
   virtual ~CovMapFuncRecordReader() {}
   template <class IntPtrT, support::endianness Endian>
   static std::unique_ptr<CovMapFuncRecordReader>
-  get(coverage::CoverageMappingVersion Version, InstrProfSymtab &P,
+  get(coverage::CovMapVersion Version, InstrProfSymtab &P,
       std::vector<BinaryCoverageReader::ProfileMappingRecord> &R,
       std::vector<StringRef> &F);
 };
 
 // A class for reading coverage mapping function records for a module.
-template <coverage::CoverageMappingVersion CovMapVersion, class IntPtrT,
+template <coverage::CovMapVersion CovMapVersion, class IntPtrT,
           support::endianness Endian>
 class VersionedCovMapFuncRecordReader : public CovMapFuncRecordReader {
   typedef typename coverage::CovMapTraits<
@@ -352,8 +352,7 @@ public:
     uint32_t NRecords = CovHeader->getNRecords<Endian>();
     uint32_t FilenamesSize = CovHeader->getFilenamesSize<Endian>();
     uint32_t CoverageSize = CovHeader->getCoverageSize<Endian>();
-    assert((CoverageMappingVersion)CovHeader->getVersion<Endian>() ==
-           CovMapVersion);
+    assert((CovMapVersion)CovHeader->getVersion<Endian>() == CovMapVersion);
     Buf = reinterpret_cast<const char *>(CovHeader + 1);
 
     // Skip past the function records, saving the start and end for later.
@@ -415,14 +414,14 @@ public:
 
 template <class IntPtrT, support::endianness Endian>
 std::unique_ptr<CovMapFuncRecordReader> CovMapFuncRecordReader::get(
-    coverage::CoverageMappingVersion Version, InstrProfSymtab &P,
+    coverage::CovMapVersion Version, InstrProfSymtab &P,
     std::vector<BinaryCoverageReader::ProfileMappingRecord> &R,
     std::vector<StringRef> &F) {
   using namespace coverage;
   switch (Version) {
-  case CoverageMappingVersion1:
+  case CovMapVersion::Version1:
     return llvm::make_unique<VersionedCovMapFuncRecordReader<
-        CoverageMappingVersion1, IntPtrT, Endian>>(P, R, F);
+        CovMapVersion::Version1, IntPtrT, Endian>>(P, R, F);
   }
   llvm_unreachable("Unsupported version");
 }
@@ -436,9 +435,8 @@ static std::error_code readCoverageMappi
   // Read the records in the coverage data section.
   auto CovHeader =
       reinterpret_cast<const coverage::CovMapHeader *>(Data.data());
-  CoverageMappingVersion Version =
-      (CoverageMappingVersion)CovHeader->getVersion<Endian>();
-  if (Version > coverage::CoverageMappingCurrentVersion)
+  CovMapVersion Version = (CovMapVersion)CovHeader->getVersion<Endian>();
+  if (Version > coverage::CovMapVersion::CurrentVersion)
     return coveragemap_error::unsupported_version;
   std::unique_ptr<CovMapFuncRecordReader> Reader =
       CovMapFuncRecordReader::get<T, Endian>(Version, ProfileNames, Records,




More information about the llvm-commits mailing list