xref: /llvm-project/libc/src/string/strsignal.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
107793f95SMichael Jones //===-- Implementation of strsignal
207793f95SMichael Jones //----------------------------------------===//
307793f95SMichael Jones //
407793f95SMichael Jones // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
507793f95SMichael Jones // See https://llvm.org/LICENSE.txt for license information.
607793f95SMichael Jones // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
707793f95SMichael Jones //
807793f95SMichael Jones //===----------------------------------------------------------------------===//
907793f95SMichael Jones 
1007793f95SMichael Jones #include "src/string/strsignal.h"
1107793f95SMichael Jones #include "src/__support/StringUtil/signal_to_string.h"
1207793f95SMichael Jones #include "src/__support/common.h"
13*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
1407793f95SMichael Jones 
15*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
1607793f95SMichael Jones 
1707793f95SMichael Jones LLVM_LIBC_FUNCTION(char *, strsignal, (int sig_num)) {
1807793f95SMichael Jones   return const_cast<char *>(get_signal_string(sig_num).data());
1907793f95SMichael Jones }
2007793f95SMichael Jones 
21*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
22