Files
android_external_libcxx/test/language.support/support.start.term/quick_exit.pass.cpp
Eric Fiselier 221907d782 Cleanup quick_exit tests and get them passing in C++03.
Wrap the original test in _LIBCPP_HAS_QUICK_EXIT so it only runs when we have
quick_exit and add two new tests that check that when _LIBCPP_HAS_QUICK_EXIT
is not defined then no definition of std::at_quick_exit or std::quick_exit are
available.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222298 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 01:45:12 +00:00

25 lines
557 B
C++

//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// XFAIL: apple-darwin
// test quick_exit and at_quick_exit
#include <cstdlib>
void f() {}
int main()
{
#ifdef _LIBCPP_HAS_QUICK_EXIT
std::at_quick_exit(f);
std::quick_exit(0);
#endif
}