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

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.

Reviewers: Dor1s, davidxl

Reviewed By: Dor1s

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D63581

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@364231 91177308-0d34-0410-b5e6-96231b3b80d8
6 files changed