brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · bfec39b Raw
43 lines · c
1//===-- Map from signal numbers to strings ----------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_SIGNAL_TABLE_H10#define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_SIGNAL_TABLE_H11 12#include "src/__support/StringUtil/message_mapper.h"13 14#include "posix_signals.h"15#include "src/__support/macros/config.h"16#include "stdc_signals.h"17 18#if defined(__linux__) || defined(__Fuchsia__)19#define USE_LINUX_PLATFORM_SIGNALS 120#else21#define USE_LINUX_PLATFORM_SIGNALS 022#endif23 24#if USE_LINUX_PLATFORM_SIGNALS25#include "linux_extension_signals.h"26#endif27 28namespace LIBC_NAMESPACE_DECL {29namespace internal {30 31LIBC_INLINE_VAR constexpr auto PLATFORM_SIGNALS = []() {32  if constexpr (USE_LINUX_PLATFORM_SIGNALS) {33    return STDC_SIGNALS + POSIX_SIGNALS + LINUX_SIGNALS;34  } else {35    return STDC_SIGNALS;36  }37}();38 39} // namespace internal40} // namespace LIBC_NAMESPACE_DECL41 42#endif // LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_SIGNAL_TABLE_H43