[PATCH] D20997: [Coverage] Fix an assertion failure if the definition of an unused function spans multiple files.

Igor Kudrin via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 4 04:36:59 PDT 2016


ikudrin created this revision.
ikudrin added reviewers: vsk, bogner, davidxl.
ikudrin added a subscriber: cfe-commits.
ikudrin set the repository for this revision to rL LLVM.

We had an assertion failure if, for example, the definition of an unused inline function starts
in one macro and ends in another. This patch fixes the issue by finding the common ancestor
of the start and end locations of that function's body and changing the locations accordingly.

Repository:
  rL LLVM

http://reviews.llvm.org/D20997

Files:
  lib/CodeGen/CoverageMappingGen.cpp
  test/CoverageMapping/Inputs/ends_a_scope_only
  test/CoverageMapping/Inputs/starts_a_scope_only
  test/CoverageMapping/unused_function.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20997.59648.patch
Type: text/x-patch
Size: 3963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160604/98493073/attachment.bin>


More information about the cfe-commits mailing list