This is an archive of the discontinued LLVM Phabricator instance.

[llvm-cov][test] Add test coverage for "gcov" implying "llvm-cov gcov" compatibility.
ClosedPublic

Authored by rupprecht on May 11 2021, 6:39 PM.

Details

Summary

Much like other LLVM binary utilities, llvm-cov has a symlink compatibility feature where it runs in gcov compatibility mode if the binary name ends in gcov. This is identical to invoking llvm-cov gcov ....

Diff Detail

Event Timeline

rupprecht requested review of this revision.May 11 2021, 6:39 PM
rupprecht created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2021, 6:39 PM
MaskRay accepted this revision.May 11 2021, 8:45 PM

Thanks!

This revision is now accepted and ready to land.May 11 2021, 8:45 PM

Is it strictly ends with, or do things like file extensions, version numbers etc have an impact? See the additional test cases in https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-objcopy/tool-name.test.

Is it strictly ends with, or do things like file extensions, version numbers etc have an impact? See the additional test cases in https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-objcopy/tool-name.test.

Strictly ends with. See https://github.com/llvm/llvm-project/blob/98575708da9544ccab8939fece9c3d638a32f09f/llvm/tools/llvm-cov/llvm-cov.cpp#L63.

I could land this as-is and copy that from llvm-objcopy so "llvm-gcov-10" would be recognized. Although I don't know how many people are relying on this -- the existence of this doesn't even seem to be in cmake configs (i.e. we don't produce *gcov symlinks like we do for llvm-strip).