aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm/Support/ExitCodes.h
blob: 3fe064313f393920f476ae1d148d351b1263f098 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

//===-- llvm/Support/ExitCodes.h - Exit codes for exit()  -------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file contains definitions of exit codes for exit() function. They are
/// either defined by sysexits.h if it is supported, or defined here if
/// sysexits.h is not supported.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_SUPPORT_EXITCODES_H
#define LLVM_SUPPORT_EXITCODES_H

#include "llvm/Config/llvm-config.h"

#if HAVE_SYSEXITS_H
#include <sysexits.h>
#elif __MVS__
// <sysexits.h> does not exist on z/OS. The only value used in LLVM is
// EX_IOERR, which is used to signal a special error condition (broken pipe).
// Define the macro with its usual value from BSD systems, which is chosen to
// not clash with more standard exit codes like 1.
#define EX_IOERR 74
#elif LLVM_ON_UNIX
#error Exit code EX_IOERR not available
#endif

#endif

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif