[all-commits] [llvm/llvm-project] 3be2ba: [SystemZ][z/OS][Windows] Add new functions that se...

Abhina Sree via All-commits all-commits at lists.llvm.org
Fri Apr 16 05:09:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3be2ba0ba38a1799d937a0ef302fb792d12d75a8
      https://github.com/llvm/llvm-project/commit/3be2ba0ba38a1799d937a0ef302fb792d12d75a8
  Author: Abhina Sreeskantharajan <Abhina.Sreeskantharajan at ibm.com>
  Date:   2021-04-16 (Fri, 16 Apr 2021)

  Changed paths:
    M llvm/include/llvm/Support/Program.h
    M llvm/lib/Support/MemoryBuffer.cpp
    M llvm/lib/Support/Unix/Program.inc
    M llvm/lib/Support/Windows/Program.inc
    M llvm/lib/Support/raw_ostream.cpp

  Log Message:
  -----------
  [SystemZ][z/OS][Windows] Add new functions that set Text/Binary mode for Stdin and Stdout based on OpenFlags

On Windows, we want to open a file in Binary mode if OF_CRLF bit is not set. On z/OS, we want to open a file in Binary mode if the OF_Text bit is not set.

This patch creates two new functions called ChangeStdinMode and ChangeStdoutMode which will take OpenFlags as an arg to determine which mode to set stdin and stdout to. This will enable patches like https://reviews.llvm.org/D100056 to not affect Windows when setting the OF_Text flag for raw_fd_streams.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D100130




More information about the All-commits mailing list