[PATCH] D37387: [Coverage] Report errors when reading malformed source regions

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 1 10:44:44 PDT 2017


vsk created this revision.

Each source region has a start and end location. Report an error when
the end location does not precede the begin location.

      

The old lineExecutionCounts.covmapping test actually had a buggy source
region in it. This commit introduces a regenerated copy of the coverage
and moves the old copy to malformedRegions.covmapping, for a test.

This is needed to unblock https://reviews.llvm.org/D36813, since the proposed segment builder
changes assert-fail when given bogus input.


https://reviews.llvm.org/D37387

Files:
  include/llvm/ProfileData/Coverage/CoverageMappingReader.h
  lib/ProfileData/Coverage/CoverageMapping.cpp
  lib/ProfileData/Coverage/CoverageMappingReader.cpp
  lib/ProfileData/Coverage/CoverageMappingWriter.cpp
  test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping
  test/tools/llvm-cov/Inputs/lineExecutionCounts.json
  test/tools/llvm-cov/Inputs/malformedRegions.covmapping
  test/tools/llvm-cov/showLineExecutionCounts.cpp
  test/tools/llvm-cov/warnings.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37387.113557.patch
Type: text/x-patch
Size: 10446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170901/2e5b02f1/attachment.bin>


More information about the llvm-commits mailing list