This is an archive of the discontinued LLVM Phabricator instance.

(Reland with changes) Adding a function for setting coverage output file.
ClosedPublic

Authored by sajjadm on Jun 19 2019, 5:03 PM.

Details

Summary

User code can open a file on its own and pass it to the runtime, rather than
specifying a name and having the runtime open the file. This supports the use
case where a process cannot open a file on its own but can receive a file
descriptor from another process.

Relanding https://reviews.llvm.org/D62541. The original revision unlocked
the file before calling flush, this revision fixes that.

Event Timeline

sajjadm created this revision.Jun 19 2019, 5:03 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 19 2019, 5:03 PM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
sajjadm edited the summary of this revision. (Show Details)Jun 19 2019, 5:08 PM
sajjadm updated this revision to Diff 205719.Jun 19 2019, 5:10 PM

Ran clang-format.

Dor1s accepted this revision.Jun 20 2019, 4:20 PM

LGTM, thanks @sajjadm !

compiler-rt/lib/profile/InstrProfilingFile.c
301–312

Looks like only this part has changed compared to https://reviews.llvm.org/D62541 + the tests.

This revision is now accepted and ready to land.Jun 20 2019, 4:20 PM
This revision was automatically updated to reflect the committed changes.