HomePhabricator

[SystemZ/ZOS] Add header file to encapsulate use of <sysexits.h>

Authored by Kai on May 20 2020, 2:10 AM.

Description

[SystemZ/ZOS] Add header file to encapsulate use of <sysexits.h>

The non-standard header file <sysexits.h> provides some return values.
EX_IOERR is used to as a special value to signal a broken pipe to the clang driver.
On z/OS Unix System Services, this header file does not exists. This patch

  • adds a check for <sysexits.h>, removing the dependency on LLVM_ON_UNIX
  • adds a new header file llvm/Support/ExitCodes, which either includes <sysexits.h> or defines EX_IOERR
  • updates the users of EX_IOERR to include the new header file

Reviewed By: hubert.reinterpretcast

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