This is an archive of the discontinued LLVM Phabricator instance.

llvm-cov don't fail the entire invocation if one of the provided object doesn't contain coverage info
Needs RevisionPublic

Authored by eagleonhill on Jun 22 2019, 6:38 PM.

Details

Summary

It's common for an object to not contain any profilable function, e.g. constants only. We use relevant objects to filter the coverage instrumenation and support multi-processing.
some random non-profilable object could fail the entire invocation.

This will make llvm-cov ignore if any objects is empty, however it still fail if all of the provided objects are empty.

Diff Detail

Event Timeline

eagleonhill created this revision.Jun 22 2019, 6:38 PM
vsk added a comment.Jun 24 2019, 10:55 AM

Thanks for the patch.

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp
297

Could you please rebase this patch on top of r363325 (D63232)?

llvm/test/tools/llvm-cov/empty_object.test
1

Please check in the .o file instead of invoking clang, as it won't be available on the buildbots.

11

IIRC the syntax for expected-to-fail RUN commands is 'not <command>'.

vsk requested changes to this revision.Jul 10 2019, 2:42 PM

(Marking this to reflect my comment from 5/24 to clear my review queue)

This revision now requires changes to proceed.Jul 10 2019, 2:42 PM