From 61b9a7258a7693d7f3674a5a1daf7b036ff1d382 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 6 Sep 2015 18:46:46 +0000 Subject: Import libc++ 3.7.0 release (r246257). --- .../support.runtime/csetjmp.pass.cpp | 24 ++++++ .../support.runtime/csignal.pass.cpp | 57 ++++++++++++++ .../support.runtime/cstdarg.pass.cpp | 35 +++++++++ .../support.runtime/cstdbool.pass.cpp | 32 ++++++++ .../support.runtime/cstdlib.pass.cpp | 88 ++++++++++++++++++++++ .../support.runtime/ctime.pass.cpp | 42 +++++++++++ .../support.runtime/version_csetjmp.pass.cpp | 20 +++++ .../support.runtime/version_csignal.pass.cpp | 20 +++++ .../support.runtime/version_cstdarg.pass.cpp | 20 +++++ .../support.runtime/version_cstdbool.pass.cpp | 20 +++++ .../support.runtime/version_cstdlib.pass.cpp | 20 +++++ .../support.runtime/version_ctime.pass.cpp | 20 +++++ 12 files changed, 398 insertions(+) create mode 100644 test/std/language.support/support.runtime/csetjmp.pass.cpp create mode 100644 test/std/language.support/support.runtime/csignal.pass.cpp create mode 100644 test/std/language.support/support.runtime/cstdarg.pass.cpp create mode 100644 test/std/language.support/support.runtime/cstdbool.pass.cpp create mode 100644 test/std/language.support/support.runtime/cstdlib.pass.cpp create mode 100644 test/std/language.support/support.runtime/ctime.pass.cpp create mode 100644 test/std/language.support/support.runtime/version_csetjmp.pass.cpp create mode 100644 test/std/language.support/support.runtime/version_csignal.pass.cpp create mode 100644 test/std/language.support/support.runtime/version_cstdarg.pass.cpp create mode 100644 test/std/language.support/support.runtime/version_cstdbool.pass.cpp create mode 100644 test/std/language.support/support.runtime/version_cstdlib.pass.cpp create mode 100644 test/std/language.support/support.runtime/version_ctime.pass.cpp (limited to 'test/std/language.support/support.runtime') diff --git a/test/std/language.support/support.runtime/csetjmp.pass.cpp b/test/std/language.support/support.runtime/csetjmp.pass.cpp new file mode 100644 index 0000000000000..dc034ce099e2e --- /dev/null +++ b/test/std/language.support/support.runtime/csetjmp.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test + +#include +#include + +#ifndef setjmp +#error setjmp not defined +#endif + +int main() +{ + std::jmp_buf jb; + static_assert((std::is_same::value), + "std::is_same::value"); +} diff --git a/test/std/language.support/support.runtime/csignal.pass.cpp b/test/std/language.support/support.runtime/csignal.pass.cpp new file mode 100644 index 0000000000000..717347df7f005 --- /dev/null +++ b/test/std/language.support/support.runtime/csignal.pass.cpp @@ -0,0 +1,57 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test + +#include +#include + +#ifndef SIG_DFL +#error SIG_DFL not defined +#endif + +#ifndef SIG_ERR +#error SIG_ERR not defined +#endif + +#ifndef SIG_IGN +#error SIG_IGN not defined +#endif + +#ifndef SIGABRT +#error SIGABRT not defined +#endif + +#ifndef SIGFPE +#error SIGFPE not defined +#endif + +#ifndef SIGILL +#error SIGILL not defined +#endif + +#ifndef SIGINT +#error SIGINT not defined +#endif + +#ifndef SIGSEGV +#error SIGSEGV not defined +#endif + +#ifndef SIGTERM +#error SIGTERM not defined +#endif + +int main() +{ + std::sig_atomic_t sig; + typedef void (*func)(int); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); +} diff --git a/test/std/language.support/support.runtime/cstdarg.pass.cpp b/test/std/language.support/support.runtime/cstdarg.pass.cpp new file mode 100644 index 0000000000000..059ad2f4ff91e --- /dev/null +++ b/test/std/language.support/support.runtime/cstdarg.pass.cpp @@ -0,0 +1,35 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test + +#include + +#ifndef va_arg +#error va_arg not defined +#endif + +#if __cplusplus >= 201103L +# ifndef va_copy +# error va_copy is not defined when c++ >= 11 +# endif +#endif + +#ifndef va_end +#error va_end not defined +#endif + +#ifndef va_start +#error va_start not defined +#endif + +int main() +{ + std::va_list va; +} diff --git a/test/std/language.support/support.runtime/cstdbool.pass.cpp b/test/std/language.support/support.runtime/cstdbool.pass.cpp new file mode 100644 index 0000000000000..f52c1556feb01 --- /dev/null +++ b/test/std/language.support/support.runtime/cstdbool.pass.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test + +#include + +#ifndef __bool_true_false_are_defined +#error __bool_true_false_are_defined not defined +#endif + +#ifdef bool +#error bool should not be defined +#endif + +#ifdef true +#error true should not be defined +#endif + +#ifdef false +#error false should not be defined +#endif + +int main() +{ +} diff --git a/test/std/language.support/support.runtime/cstdlib.pass.cpp b/test/std/language.support/support.runtime/cstdlib.pass.cpp new file mode 100644 index 0000000000000..073949122b010 --- /dev/null +++ b/test/std/language.support/support.runtime/cstdlib.pass.cpp @@ -0,0 +1,88 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test + +#include +#include + +#ifndef EXIT_FAILURE +#error EXIT_FAILURE not defined +#endif + +#ifndef EXIT_SUCCESS +#error EXIT_SUCCESS not defined +#endif + +#ifndef MB_CUR_MAX +#error MB_CUR_MAX not defined +#endif + +#ifndef NULL +#error NULL not defined +#endif + +#ifndef RAND_MAX +#error RAND_MAX not defined +#endif + +int main() +{ + std::size_t s = 0; + std::div_t d; + std::ldiv_t ld; + std::lldiv_t lld; + char** endptr = 0; + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + wchar_t* pw = 0; + const wchar_t* pwc = 0; + char* pc = 0; +#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); +#endif + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); +} diff --git a/test/std/language.support/support.runtime/ctime.pass.cpp b/test/std/language.support/support.runtime/ctime.pass.cpp new file mode 100644 index 0000000000000..8c5d2811d8a9e --- /dev/null +++ b/test/std/language.support/support.runtime/ctime.pass.cpp @@ -0,0 +1,42 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// test + +#include +#include + +#ifndef NULL +#error NULL not defined +#endif + +#ifndef CLOCKS_PER_SEC +#error CLOCKS_PER_SEC not defined +#endif + +int main() +{ + std::clock_t c = 0; + std::size_t s = 0; + std::time_t t = 0; + std::tm tm = {0}; + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); +#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), ""); +#endif + char* c1 = 0; + const char* c2 = 0; + static_assert((std::is_same::value), ""); +} diff --git a/test/std/language.support/support.runtime/version_csetjmp.pass.cpp b/test/std/language.support/support.runtime/version_csetjmp.pass.cpp new file mode 100644 index 0000000000000..7e37716d01459 --- /dev/null +++ b/test/std/language.support/support.runtime/version_csetjmp.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/std/language.support/support.runtime/version_csignal.pass.cpp b/test/std/language.support/support.runtime/version_csignal.pass.cpp new file mode 100644 index 0000000000000..be1045f1eb3b1 --- /dev/null +++ b/test/std/language.support/support.runtime/version_csignal.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/std/language.support/support.runtime/version_cstdarg.pass.cpp b/test/std/language.support/support.runtime/version_cstdarg.pass.cpp new file mode 100644 index 0000000000000..f3ca9389b15d2 --- /dev/null +++ b/test/std/language.support/support.runtime/version_cstdarg.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/std/language.support/support.runtime/version_cstdbool.pass.cpp b/test/std/language.support/support.runtime/version_cstdbool.pass.cpp new file mode 100644 index 0000000000000..0415227e58ead --- /dev/null +++ b/test/std/language.support/support.runtime/version_cstdbool.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/std/language.support/support.runtime/version_cstdlib.pass.cpp b/test/std/language.support/support.runtime/version_cstdlib.pass.cpp new file mode 100644 index 0000000000000..db419524f5783 --- /dev/null +++ b/test/std/language.support/support.runtime/version_cstdlib.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} diff --git a/test/std/language.support/support.runtime/version_ctime.pass.cpp b/test/std/language.support/support.runtime/version_ctime.pass.cpp new file mode 100644 index 0000000000000..ce0bf2cf1853c --- /dev/null +++ b/test/std/language.support/support.runtime/version_ctime.pass.cpp @@ -0,0 +1,20 @@ +//===----------------------------------------------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// + +#include + +#ifndef _LIBCPP_VERSION +#error _LIBCPP_VERSION not defined +#endif + +int main() +{ +} -- cgit v1.2.3