xref: /llvm-project/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp (revision 57b08b0944046a6a57ee9b7b479181f548a5b9b4)
1 //===----------------------------------------------------------------------===//
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 // UNSUPPORTED: c++98, c++03
9 
10 // test quick_exit and at_quick_exit
11 
12 #include <cstdlib>
13 
14 void f() {}
15 
16 int main()
17 {
18 #ifdef _LIBCPP_HAS_QUICK_EXIT
19     std::at_quick_exit(f);
20     std::quick_exit(0);
21 #endif
22 }
23