This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][z/OS] Pass OpenFlags when creating tmp files
ClosedPublic

Authored by abhina.sreeskantharajan on Jun 7 2021, 6:03 AM.

Details

Summary

This patch https://reviews.llvm.org/D102876 caused some lit regressions on z/OS because tmp files were no longer being opened based on binary/text mode. This patch passes OpenFlags when creating tmp files so we can open files in different modes.

Diff Detail

Unit TestsFailed

Event Timeline

abhina.sreeskantharajan requested review of this revision.Jun 7 2021, 6:03 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 7 2021, 6:03 AM
rnk added a comment.Jun 7 2021, 9:35 AM

I see, thanks.

llvm/lib/Support/Path.cpp
1296

Instead of requiring the caller to add OF_Delete, I think it would be better to pass OF_Delete | Flags here.

llvm/lib/Support/Path.cpp
1296

Sure, I'll make that change. Do you think we should change the name to "ExtraFlags" to indicate there is a default, or is the current name is fine?

rnk added inline comments.Jun 7 2021, 12:30 PM
llvm/lib/Support/Path.cpp
1296

That seems reasonable to me, I like ExtraFlags.

Address rnk's comments and rename to ExtraFlags

abhina.sreeskantharajan marked 2 inline comments as done.Jun 7 2021, 12:36 PM
amccarth accepted this revision.Jun 7 2021, 1:52 PM

LGTM

This revision is now accepted and ready to land.Jun 7 2021, 1:52 PM
This revision was landed with ongoing or failed builds.Jun 8 2021, 11:45 AM
This revision was automatically updated to reflect the committed changes.