From b2ebf2a08b1c1bf1f7629a7ff6c1c28d38058e21 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Fri, 25 Jul 2014 22:22:24 +0000 Subject: [PATCH] coverage: remove empty mapping regions This patch removes the empty coverage mapping regions. Those regions were produced by clang's old mapping region generation algorithm, but the new algorithm doesn't generate them. llvm-svn: 213981 --- llvm/include/llvm/ProfileData/CoverageMapping.h | 4 ---- llvm/lib/ProfileData/CoverageMappingReader.cpp | 3 --- llvm/lib/ProfileData/CoverageMappingWriter.cpp | 5 ----- 3 files changed, 12 deletions(-) diff --git a/llvm/include/llvm/ProfileData/CoverageMapping.h b/llvm/include/llvm/ProfileData/CoverageMapping.h index 12128d30ecb4..39d1ae1bf577 100644 --- a/llvm/include/llvm/ProfileData/CoverageMapping.h +++ b/llvm/include/llvm/ProfileData/CoverageMapping.h @@ -139,10 +139,6 @@ struct CounterMappingRegion { /// such as for a macro instantiation or #include file. ExpansionRegion, - /// \brief An EmptyRegion represents a source range without code, - /// but with a distinct counter. - EmptyRegion, - /// \brief A SkippedRegion represents a source range with code that /// was skipped by a preprocessor or similar means. SkippedRegion diff --git a/llvm/lib/ProfileData/CoverageMappingReader.cpp b/llvm/lib/ProfileData/CoverageMappingReader.cpp index 72dbb6c7808f..21acae1bbdd3 100644 --- a/llvm/lib/ProfileData/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/CoverageMappingReader.cpp @@ -160,9 +160,6 @@ std::error_code RawCoverageMappingReader::readMappingRegionsSubArray( case CounterMappingRegion::CodeRegion: // Don't do anything when we have a code region with a zero counter. break; - case CounterMappingRegion::EmptyRegion: - Kind = CounterMappingRegion::EmptyRegion; - break; case CounterMappingRegion::SkippedRegion: Kind = CounterMappingRegion::SkippedRegion; break; diff --git a/llvm/lib/ProfileData/CoverageMappingWriter.cpp b/llvm/lib/ProfileData/CoverageMappingWriter.cpp index 0e8c0445f906..f9bbe61fb485 100644 --- a/llvm/lib/ProfileData/CoverageMappingWriter.cpp +++ b/llvm/lib/ProfileData/CoverageMappingWriter.cpp @@ -172,11 +172,6 @@ void CoverageMappingWriter::write(raw_ostream &OS) { encodeULEB128(EncodedTagExpandedFileID, OS); break; } - case CounterMappingRegion::EmptyRegion: - encodeULEB128(unsigned(I.Kind) - << Counter::EncodingCounterTagAndExpansionRegionTagBits, - OS); - break; case CounterMappingRegion::SkippedRegion: assert(Count.isZero()); encodeULEB128(unsigned(I.Kind)