Page MenuHomePhabricator

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

Authored by abhina.sreeskantharajan on Mon, Jun 7, 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

Event Timeline

abhina.sreeskantharajan requested review of this revision.Mon, Jun 7, 6:03 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMon, Jun 7, 6:03 AM
rnk added a comment.Mon, Jun 7, 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.Mon, Jun 7, 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.Mon, Jun 7, 12:36 PM
amccarth accepted this revision.Mon, Jun 7, 1:52 PM

LGTM

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