[PATCH] D99426: [Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text

Abhina Sree via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 15:16:19 PDT 2021


abhina.sreeskantharajan added a comment.

In D99426#2653725 <https://reviews.llvm.org/D99426#2653725>, @MaskRay wrote:

> This touches a lot of files. I am a bit worried that it would not be easy for a contributor to know OF_TextWithCRLF is needed to make SystemZ happy.
>
>> On SystemZ we need to open text files in text mode,
>
> Why can't it be served without CRLF translation?

So this is a quick summary of the problem we're facing: 
On SystemZ, we can accept both OF_Text or OF_TextWithCRLF, it makes no difference. However, there are many text files that are marked as binary/OF_None to suppress CRLF translation on Windows. (e.g. patches like this one https://reviews.llvm.org/rGe78a7a0ecddc747129512fabf4836e22d1805f00). On SystemZ we need the text files to be marked as text and have made patches in the past to do so (e.g. https://reviews.llvm.org/D67696). These efforts are conflicting with each other, so Reid suggested this solution where we create a new flag that will set text mode and turn on CRLF translation on Windows platform. Then we will be able to mark all remaining text files with OF_Text and not turn on CRLF translation for Windows.

I agree this patch is touching a lot of files,  I can maybe do the opposite and create a flag called OF_TextWithoutCRLF. I'm open to any new solutions to this problem.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99426/new/

https://reviews.llvm.org/D99426



More information about the llvm-commits mailing list