[profile] Fix file contention causing dropped counts on Windows under -fprofile-generate
When writing profile data on Windows we were opening profile file with
exclusive read/write access.
In case we are trying to write to the file from multiple processes
simultaneously, subsequent calls to CreateFileA would return
To fix this, I changed to open without exclusive access and then take a
Patch by Michael Holman!
Differential revision: https://reviews.llvm.org/D70330
(cherry picked from commit 900d8a9a3b4efeefddd310e92219741d98e7270b)
4 files changed