rnk added a comment.

In D96363#2650999 <https://reviews.llvm.org/D96363#2650999>, 
@abhina.sreeskantharajan wrote:

> Right, adding a new flag like OF_TextNoCrlf is something I can look into as a 
> solution. However, if Windows is always using binary mode and has no use for 
> OF_Text flag, maybe I can globally set that mode similar to how I set it for 
> ToolOutputFiles. I don't think any other platform is affected by the 
> binary/text mode.

I can't say for sure if we always want LF output on Windows, so I'm not sure we 
should commit to that simplification. I think we usually want to avoid CRLF 
when we are writing code-like output files, things like JSON, YAML, or C++ .inc 
files, but we might want to retain CRLF when writing to things like log files 
or IDEs. And even if we audit all current use cases, someone in the future 
might want CRLF conversion. On the other hand, it does leave behind a bit of a 
trap for developers, who will probably pick OF_Text before OF_TextNoCrlf. Maybe 
OF_Text should not do the conversion, and a longer OF_TextWithCrlf should 
enable CRLF conversion.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96363

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to