From e4d9c316d2e7add22fb6640000f2f3a30ed31fc0 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sun, 24 Jul 2016 03:51:39 +0000 Subject: Implement P0040r3: Extending memory management tools llvm-svn: 276544 --- libcxx/test/support/test_throw.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 libcxx/test/support/test_throw.h (limited to 'libcxx/test/support') diff --git a/libcxx/test/support/test_throw.h b/libcxx/test/support/test_throw.h new file mode 100644 index 00000000000..805cb049de8 --- /dev/null +++ b/libcxx/test/support/test_throw.h @@ -0,0 +1,27 @@ +// -*- C++ -*- +//===---------------------------- test_macros.h ---------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +#ifndef SUPPORT_TEST_THROW_H +#define SUPPORT_TEST_THROW_H + +#include "test_macros.h" +#include + +template +TEST_NORETURN +inline void test_throw() { +#ifndef TEST_HAS_NO_EXCEPTIONS + throw Ex(); +#else + std::abort(); +#endif +} + +#endif // SUPPORT_TEST_THROW_H -- cgit v1.2.3