Page MenuHomePhabricator

[GCOV] Skip artificial functions from being emitted
Needs ReviewPublic

Authored by aganea on Sep 6 2019, 9:00 AM.

Details

Reviewers
rnk
Summary

I had to revert D66328 because it was breaking asan, see here or here. Before I could commit it again, it would need this patch.

Diff Detail

Repository
rL LLVM

Event Timeline

aganea created this revision.Sep 6 2019, 9:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2019, 9:00 AM
rnk added inline comments.
lib/Transforms/Instrumentation/GCOVProfiling.cpp
731–732

Artificial lines here are skipped. If gcov is running, it means that we have an artificial function which contains non-artificial debug locations, otherwise functionHasLines would return false. Do you think we should just add this guard to the other addLine call maybe?

+@nlewycky @dblaikie, since they show up in the blame at rL210239, which added this check.

dblaikie added inline comments.Sep 6 2019, 6:04 PM
lib/Transforms/Instrumentation/GCOVProfiling.cpp
731–732

It's... errr... been a while?

I'm not sure I'll be much more use than a blind/fresh reading of the code/commit history here. But if it's useful to have a second set of eyes (mine) - I might need more words (just rephrasing your question, @rnk with some more words to help me understand what's happening here/being proposed)