This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][z/OS] Add IsText Argument to GetFile and GetFileOrSTDIN
ClosedPublic

Authored by Jonathan.Crowther on Apr 14 2021, 8:41 AM.

Details

Summary

Add the IsText argument to GetFile and GetFileOrSTDIN which will help z/OS distinguish between text and binary correctly. This is an extension to this patch

Diff Detail

Event Timeline

Jonathan.Crowther requested review of this revision.Apr 14 2021, 8:41 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 14 2021, 8:41 AM
amccarth accepted this revision.Apr 14 2021, 12:03 PM

Personally, I'm not a fan of boolean function parameters because of the inline comments necessary to make the call site understandable. But it appears to be consistent with LLVM Coding Standards and other APIs, so this looks right to me.

This revision is now accepted and ready to land.Apr 14 2021, 12:03 PM

No updates, just want to kick off the CI again.

rnk added a comment.Apr 15 2021, 1:18 PM

Personally, I'm not a fan of boolean function parameters because of the inline comments necessary to make the call site understandable. But it appears to be consistent with LLVM Coding Standards and other APIs, so this looks right to me.

I think it would be a reasonable follow-up change to turn these optional boolean parameters into a flags enum.

Personally, I'm not a fan of boolean function parameters because of the inline comments necessary to make the call site understandable. But it appears to be consistent with LLVM Coding Standards and other APIs, so this looks right to me.

I think it would be a reasonable follow-up change to turn these optional boolean parameters into a flags enum.

That's a good idea. There hasn't been a usage of getFile or getFileOrSTDIN that wanted CRLF translation so far, but this may not be the case always.

This revision was landed with ongoing or failed builds.Apr 16 2021, 7:08 AM
This revision was automatically updated to reflect the committed changes.