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

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 04:15:01 PDT 2020


Kai created this revision.
Kai added reviewers: rnk, jfb, majnemer, ilya-biryukov, aganea, hubert.reinterpretcast, kbarton, yusra.syeda, uweigand.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya, mgorny.
Herald added a project: LLVM.

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




https://reviews.llvm.org/D83472

Files:
  clang/lib/Driver/Driver.cpp
  llvm/cmake/config-ix.cmake
  llvm/include/llvm/Support/ExitCodes.h
  llvm/lib/Support/CrashRecoveryContext.cpp
  llvm/lib/Support/Unix/Signals.inc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83472.276699.patch
Type: text/x-patch
Size: 3806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200709/ba9c8add/attachment.bin>


More information about the llvm-commits mailing list