This is an archive of the discontinued LLVM Phabricator instance.

[Support] Use FILE_SHARE_DELETE to fix RemoveFileOnSignal on Windows
ClosedPublic

Authored by rnk on Aug 4 2017, 1:02 PM.

Details

Summary

Tools like clang that use RemoveFileOnSignal on their output files
weren't actually able to clean up their outputs before this change. Now
the call to llvm::sys::fs::remove succeeds and the temporary file is
deleted. This is a stop-gap to fix clang before implementing the
solution outlined in PR34070.

Event Timeline

rnk created this revision.Aug 4 2017, 1:02 PM
davide accepted this revision.Aug 4 2017, 2:18 PM

LGTM as a stopgap solution (and realistically, we won't have the new library today).

This revision is now accepted and ready to land.Aug 4 2017, 2:18 PM
This revision was automatically updated to reflect the committed changes.