[PATCH] Coverage: remove empty mapping regions
Bob Wilson
bob.wilson at apple.com
Fri Jul 25 15:21:33 PDT 2014
Hard to argue with that one! Please go ahead and commit.
> On Jul 25, 2014, at 2:37 PM, Alex Lorenz <arphaman at gmail.com> wrote:
>
> Hi bogner, bob.wilson,
>
> 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.
>
> http://reviews.llvm.org/D4677
>
> Files:
> include/llvm/ProfileData/CoverageMapping.h
> lib/ProfileData/CoverageMappingReader.cpp
> lib/ProfileData/CoverageMappingWriter.cpp
>
> Index: include/llvm/ProfileData/CoverageMapping.h
> ===================================================================
> --- include/llvm/ProfileData/CoverageMapping.h
> +++ include/llvm/ProfileData/CoverageMapping.h
> @@ -139,10 +139,6 @@
> /// 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
> Index: lib/ProfileData/CoverageMappingReader.cpp
> ===================================================================
> --- lib/ProfileData/CoverageMappingReader.cpp
> +++ lib/ProfileData/CoverageMappingReader.cpp
> @@ -160,9 +160,6 @@
> 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;
> Index: lib/ProfileData/CoverageMappingWriter.cpp
> ===================================================================
> --- lib/ProfileData/CoverageMappingWriter.cpp
> +++ lib/ProfileData/CoverageMappingWriter.cpp
> @@ -172,11 +172,6 @@
> 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)
> <D4677.11895.patch>
More information about the llvm-commits
mailing list