| 1 | //===-- Map of C standard 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-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_SIGNALS_H |
| 10 | #define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_SIGNALS_H |
| 11 | |
| 12 | #include <signal.h> // For signal numbers |
| 13 | |
| 14 | #include "src/__support/StringUtil/message_mapper.h" |
| 15 | #include "src/__support/macros/config.h" |
| 16 | |
| 17 | namespace LIBC_NAMESPACE_DECL { |
| 18 | |
| 19 | LIBC_INLINE_VAR constexpr const MsgTable<6> STDC_SIGNALS = { |
| 20 | MsgMapping(SIGINT, "Interrupt" ), |
| 21 | MsgMapping(SIGILL, "Illegal instruction" ), |
| 22 | MsgMapping(SIGABRT, "Aborted" ), |
| 23 | MsgMapping(SIGFPE, "Floating point exception" ), |
| 24 | MsgMapping(SIGSEGV, "Segmentation fault" ), |
| 25 | MsgMapping(SIGTERM, "Terminated" ), |
| 26 | }; |
| 27 | |
| 28 | } // namespace LIBC_NAMESPACE_DECL |
| 29 | |
| 30 | #endif // LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_STDC_SIGNALS_H |
| 31 | |