This is an archive of the discontinued LLVM Phabricator instance.

Frontend: Respect -working-directory when checking if output files can be written
ClosedPublic

Authored by dexonsmith on Jan 26 2021, 7:39 PM.

Details

Summary

Call FixupRelativePath when opening output files to ensure that
-working-directory is used when checking up front for write failures,
not just when finalizing the files at the end. This also moves the
temporary file into the same directory as the output file.

Diff Detail

Event Timeline

dexonsmith created this revision.Jan 26 2021, 7:39 PM
dexonsmith requested review of this revision.Jan 26 2021, 7:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2021, 7:39 PM

ping / rebase

Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2022, 11:18 AM
steven_wu accepted this revision.Sep 8 2022, 11:19 AM

LGTM. I will commit this if no objection.

This revision is now accepted and ready to land.Sep 8 2022, 11:19 AM
steven_wu requested changes to this revision.Sep 8 2022, 11:21 AM

Actually, we need to fix the case when output is '-'.

This revision now requires changes to proceed.Sep 8 2022, 11:21 AM
steven_wu updated this revision to Diff 458823.Sep 8 2022, 12:20 PM
steven_wu edited the summary of this revision. (Show Details)

Rebase patch and fix the problem when the input is '-'

steven_wu resigned from this revision.Sep 8 2022, 12:21 PM
benlangmuir accepted this revision.Sep 9 2022, 8:42 AM
This revision is now accepted and ready to land.Sep 9 2022, 8:42 AM