107bd4394SRoseZhang03 //===-------- Baremetal implementation of an exit function ------*- C++ -*-===// 207bd4394SRoseZhang03 // 307bd4394SRoseZhang03 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 407bd4394SRoseZhang03 // See https://llvm.org/LICENSE.txt for license information. 507bd4394SRoseZhang03 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 607bd4394SRoseZhang03 // 707bd4394SRoseZhang03 //===----------------------------------------------------------------------===// 807bd4394SRoseZhang03 907bd4394SRoseZhang03 #include "src/__support/OSUtil/exit.h" 10*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h" 1107bd4394SRoseZhang03 12*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL { 13*5ff3ff33SPetr Hosek namespace internal { 14be9b1de1SPetr Hosek 1507bd4394SRoseZhang03 // This is intended to be provided by the vendor. 1607bd4394SRoseZhang03 extern "C" [[noreturn]] void __llvm_libc_exit(int status); 1707bd4394SRoseZhang03 1807bd4394SRoseZhang03 [[noreturn]] void exit(int status) { __llvm_libc_exit(status); } 1907bd4394SRoseZhang03 20*5ff3ff33SPetr Hosek } // namespace internal 21*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL 22