quick_exit.pass.cpp 560 B

1234567891011121314151617181920212223
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is dual licensed under the MIT and the University of Illinois Open
  6. // Source Licenses. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03
  10. // test quick_exit and at_quick_exit
  11. #include <cstdlib>
  12. void f() {}
  13. int main()
  14. {
  15. #ifdef _LIBCPP_HAS_QUICK_EXIT
  16. std::at_quick_exit(f);
  17. std::quick_exit(0);
  18. #endif
  19. }