Author: asiri Date: Tue May 31 07:01:32 2016 New Revision: 271267 URL: http://llvm.org/viewvc/llvm-project?rev=271267&view=rev Log: [libcxxabi] Introduce a -fno-exceptions libc++abi libary variant
Currently there is only support for a -fno-exceptions libc++ build. This is problematic for functions such as std::terminate() which are defined in libc++abi and using any of those functions throws away most of the benefits of using -fno-exceptions (code-size). This patch introduces a -fno-exceptions libc++abi build to address this issue. This new variant of libc++abi cannot be linked against any with-exceptions code as some symbols necessary for handling exceptions are missing in this library. Differential revision: http://reviews.llvm.org/D20677 Reviewers: EricWF, mclow.lists, bcraig Added: libcxxabi/trunk/src/cxa_noexception.cpp libcxxabi/trunk/test/cxa_bad_cast.pass.cpp libcxxabi/trunk/test/cxa_bad_typeid.pass.cpp libcxxabi/trunk/test/noexception1.pass.cpp libcxxabi/trunk/test/noexception2.pass.cpp libcxxabi/trunk/test/noexception3.pass.cpp libcxxabi/trunk/test/noexception4.pass.cpp - copied, changed from r270816, libcxxabi/trunk/test/uncaught_exceptions.pass.cpp Modified: libcxxabi/trunk/CMakeLists.txt libcxxabi/trunk/src/CMakeLists.txt libcxxabi/trunk/src/cxa_aux_runtime.cpp libcxxabi/trunk/src/cxa_handlers.cpp libcxxabi/trunk/src/cxa_new_delete.cpp libcxxabi/trunk/test/CMakeLists.txt libcxxabi/trunk/test/backtrace_test.pass.cpp libcxxabi/trunk/test/catch_array_01.pass.cpp libcxxabi/trunk/test/catch_array_02.pass.cpp libcxxabi/trunk/test/catch_class_01.pass.cpp libcxxabi/trunk/test/catch_class_02.pass.cpp libcxxabi/trunk/test/catch_class_03.pass.cpp libcxxabi/trunk/test/catch_class_04.pass.cpp libcxxabi/trunk/test/catch_const_pointer_nullptr.pass.cpp libcxxabi/trunk/test/catch_function_01.pass.cpp libcxxabi/trunk/test/catch_function_02.pass.cpp libcxxabi/trunk/test/catch_in_noexcept.pass.cpp libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp libcxxabi/trunk/test/catch_member_function_pointer_01.pass.cpp libcxxabi/trunk/test/catch_member_pointer_nullptr.pass.cpp libcxxabi/trunk/test/catch_multi_level_pointer.pass.cpp libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp libcxxabi/trunk/test/catch_pointer_reference.pass.cpp libcxxabi/trunk/test/catch_ptr.pass.cpp libcxxabi/trunk/test/catch_ptr_02.pass.cpp libcxxabi/trunk/test/incomplete_type.sh.cpp libcxxabi/trunk/test/inherited_exception.pass.cpp libcxxabi/trunk/test/libcxxabi/test/config.py libcxxabi/trunk/test/lit.site.cfg.in libcxxabi/trunk/test/test_aux_runtime.pass.cpp libcxxabi/trunk/test/test_aux_runtime_op_array_new.pass.cpp libcxxabi/trunk/test/test_guard.pass.cpp libcxxabi/trunk/test/test_vector1.pass.cpp libcxxabi/trunk/test/test_vector2.pass.cpp libcxxabi/trunk/test/test_vector3.pass.cpp libcxxabi/trunk/test/uncaught_exceptions.pass.cpp libcxxabi/trunk/test/unwind_01.pass.cpp libcxxabi/trunk/test/unwind_02.pass.cpp libcxxabi/trunk/test/unwind_03.pass.cpp libcxxabi/trunk/test/unwind_04.pass.cpp libcxxabi/trunk/test/unwind_05.pass.cpp libcxxabi/trunk/test/unwind_06.pass.cpp Modified: libcxxabi/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/CMakeLists.txt?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/CMakeLists.txt (original) +++ libcxxabi/trunk/CMakeLists.txt Tue May 31 07:01:32 2016 @@ -108,6 +108,7 @@ endif() #=============================================================================== # Define options. +option(LIBCXXABI_ENABLE_EXCEPTIONS "Use exceptions." ON) option(LIBCXXABI_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON) option(LIBCXXABI_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) @@ -242,13 +243,20 @@ if (LIBCXXABI_ENABLE_PEDANTIC) endif() # Get feature flags. -# Exceptions -# Catches C++ exceptions only and tells the compiler to assume that extern C -# functions never throw a C++ exception. append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_FSTRICT_ALIASING_FLAG -fstrict-aliasing) -append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_EHSC_FLAG -EHsc) -append_if(LIBCXXABI_C_FLAGS LIBCXXABI_HAS_FUNWIND_TABLES -funwind-tables) +# Exceptions +if (LIBCXXABI_ENABLE_EXCEPTIONS) + # Catches C++ exceptions only and tells the compiler to assume that extern C + # functions never throw a C++ exception. + append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_EHSC_FLAG -EHsc) + append_if(LIBCXXABI_C_FLAGS LIBCXXABI_HAS_FUNWIND_TABLES -funwind-tables) +else() + add_definitions(-D_LIBCXXABI_NO_EXCEPTIONS) + append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_NO_EXCEPTIONS_FLAG -fno-exceptions) + append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_NO_EHS_FLAG -EHs-) + append_if(LIBCXXABI_CXX_FLAGS LIBCXXABI_HAS_NO_EHA_FLAG -EHa-) +endif() append_if(LIBCXXABI_COMPILE_FLAGS LIBCXXABI_HAS_FVISIBILITY_HIDDEN_FLAG -fvisibility=hidden) Modified: libcxxabi/trunk/src/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/CMakeLists.txt?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/src/CMakeLists.txt (original) +++ libcxxabi/trunk/src/CMakeLists.txt Tue May 31 07:01:32 2016 @@ -4,12 +4,10 @@ set(LIBCXXABI_SOURCES cxa_aux_runtime.cpp cxa_default_handlers.cpp cxa_demangle.cpp - cxa_exception.cpp cxa_exception_storage.cpp cxa_guard.cpp cxa_handlers.cpp cxa_new_delete.cpp - cxa_personality.cpp cxa_unexpected.cpp cxa_vector.cpp cxa_virtual.cpp @@ -19,6 +17,13 @@ set(LIBCXXABI_SOURCES typeinfo.cpp ) +if (LIBCXXABI_ENABLE_EXCEPTIONS) + list(APPEND LIBCXXABI_SOURCES cxa_exception.cpp) + list(APPEND LIBCXXABI_SOURCES cxa_personality.cpp) +else() + list(APPEND LIBCXXABI_SOURCES cxa_noexception.cpp) +endif() + if (UNIX AND NOT (APPLE OR CYGWIN)) list(APPEND LIBCXXABI_SOURCES cxa_thread_atexit.cpp) endif() Modified: libcxxabi/trunk/src/cxa_aux_runtime.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_aux_runtime.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/src/cxa_aux_runtime.cpp (original) +++ libcxxabi/trunk/src/cxa_aux_runtime.cpp Tue May 31 07:01:32 2016 @@ -17,16 +17,28 @@ namespace __cxxabiv1 { extern "C" { _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void) { +#ifndef _LIBCXXABI_NO_EXCEPTIONS throw std::bad_cast(); +#else + std::terminate(); +#endif } _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_typeid(void) { +#ifndef _LIBCXXABI_NO_EXCEPTIONS throw std::bad_typeid(); +#else + std::terminate(); +#endif } _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_throw_bad_array_new_length(void) { +#ifndef _LIBCXXABI_NO_EXCEPTIONS throw std::bad_array_new_length(); +#else + std::terminate(); +#endif } } // extern "C" } // abi Modified: libcxxabi/trunk/src/cxa_handlers.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_handlers.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/src/cxa_handlers.cpp (original) +++ libcxxabi/trunk/src/cxa_handlers.cpp Tue May 31 07:01:32 2016 @@ -61,21 +61,21 @@ __attribute__((visibility("hidden"), nor void __terminate(terminate_handler func) _NOEXCEPT { -#if __has_feature(cxx_exceptions) +#ifndef _LIBCXXABI_NO_EXCEPTIONS try { -#endif // __has_feature(cxx_exceptions) +#endif // _LIBCXXABI_NO_EXCEPTIONS func(); // handler should not return abort_message("terminate_handler unexpectedly returned"); -#if __has_feature(cxx_exceptions) +#ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { // handler should not throw exception abort_message("terminate_handler unexpectedly threw an exception"); } -#endif // #if __has_feature(cxx_exceptions) +#endif // _LIBCXXABI_NO_EXCEPTIONS } __attribute__((noreturn)) Modified: libcxxabi/trunk/src/cxa_new_delete.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_new_delete.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/src/cxa_new_delete.cpp (original) +++ libcxxabi/trunk/src/cxa_new_delete.cpp Tue May 31 07:01:32 2016 @@ -47,7 +47,11 @@ operator new(std::size_t size) if (nh) nh(); else +#ifndef _LIBCXXABI_NO_EXCEPTIONS throw std::bad_alloc(); +#else + break; +#endif } return p; } @@ -74,13 +78,17 @@ operator new(size_t size, const std::not #endif { void* p = 0; +#ifndef _LIBCXXABI_NO_EXCEPTIONS try { +#endif p = ::operator new(size); +#ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { } +#endif return p; } @@ -115,13 +123,17 @@ operator new[](size_t size, const std::n #endif { void* p = 0; +#ifndef _LIBCXXABI_NO_EXCEPTIONS try { +#endif p = ::operator new[](size); +#ifndef _LIBCXXABI_NO_EXCEPTIONS } catch (...) { } +#endif return p; } Added: libcxxabi/trunk/src/cxa_noexception.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_noexception.cpp?rev=271267&view=auto ============================================================================== --- libcxxabi/trunk/src/cxa_noexception.cpp (added) +++ libcxxabi/trunk/src/cxa_noexception.cpp Tue May 31 07:01:32 2016 @@ -0,0 +1,60 @@ +//===------------------------- cxa_exception.cpp --------------------------===// +// +// 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. +// +// +// This file implements the "Exception Handling APIs" +// http://mentorembedded.github.io/cxx-abi/abi-eh.html +// +//===----------------------------------------------------------------------===// + +// Support functions for the no-exceptions libc++ library + +#include "config.h" +#include "cxxabi.h" + +#include <exception> // for std::terminate +#include "cxa_exception.hpp" +#include "cxa_handlers.hpp" + +namespace __cxxabiv1 { + +#pragma GCC visibility push(default) + +extern "C" { + +void +__cxa_increment_exception_refcount(void *thrown_object) throw() { + if (thrown_object != nullptr) + std::terminate(); +} + +void +__cxa_decrement_exception_refcount(void *thrown_object) throw() { + if (thrown_object != nullptr) + std::terminate(); +} + + +void *__cxa_current_primary_exception() throw() { return nullptr; } + +void +__cxa_rethrow_primary_exception(void* thrown_object) { + if (thrown_object != nullptr) + std::terminate(); +} + +bool +__cxa_uncaught_exception() throw() { return false; } + +unsigned int +__cxa_uncaught_exceptions() throw() { return 0; } + +} // extern "C" + +#pragma GCC visibility pop + +} // abi Modified: libcxxabi/trunk/test/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/CMakeLists.txt?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/CMakeLists.txt (original) +++ libcxxabi/trunk/test/CMakeLists.txt Tue May 31 07:01:32 2016 @@ -14,6 +14,7 @@ pythonize_bool(LLVM_BUILD_32_BITS) pythonize_bool(LIBCXX_ENABLE_SHARED) pythonize_bool(LIBCXXABI_ENABLE_SHARED) pythonize_bool(LIBCXXABI_ENABLE_THREADS) +pythonize_bool(LIBCXXABI_ENABLE_EXCEPTIONS) pythonize_bool(LIBCXXABI_USE_LLVM_UNWINDER) pythonize_bool(LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL) set(LIBCXXABI_TARGET_INFO "libcxx.test.target_info.LocalTI" CACHE STRING Modified: libcxxabi/trunk/test/backtrace_test.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/backtrace_test.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/backtrace_test.pass.cpp (original) +++ libcxxabi/trunk/test/backtrace_test.pass.cpp Tue May 31 07:01:32 2016 @@ -6,6 +6,9 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// + +// UNSUPPORTED: libcxxabi-no-exceptions + #include <assert.h> #include <stddef.h> #include <unwind.h> Modified: libcxxabi/trunk/test/catch_array_01.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_array_01.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_array_01.pass.cpp (original) +++ libcxxabi/trunk/test/catch_array_01.pass.cpp Tue May 31 07:01:32 2016 @@ -9,10 +9,10 @@ // Can you have a catch clause of array type that catches anything? - // GCC incorrectly allows array types to be caught by reference. // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69372 // XFAIL: gcc +// UNSUPPORTED: libcxxabi-no-exceptions #include <cassert> Modified: libcxxabi/trunk/test/catch_array_02.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_array_02.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_array_02.pass.cpp (original) +++ libcxxabi/trunk/test/catch_array_02.pass.cpp Tue May 31 07:01:32 2016 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // Can you have a catch clause of array type that catches anything? +// UNSUPPORTED: libcxxabi-no-exceptions #include <cassert> Modified: libcxxabi/trunk/test/catch_class_01.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_class_01.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_class_01.pass.cpp (original) +++ libcxxabi/trunk/test/catch_class_01.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/catch_class_02.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_class_02.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_class_02.pass.cpp (original) +++ libcxxabi/trunk/test/catch_class_02.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/catch_class_03.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_class_03.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_class_03.pass.cpp (original) +++ libcxxabi/trunk/test/catch_class_03.pass.cpp Tue May 31 07:01:32 2016 @@ -13,6 +13,8 @@ check against. */ +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/catch_class_04.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_class_04.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_class_04.pass.cpp (original) +++ libcxxabi/trunk/test/catch_class_04.pass.cpp Tue May 31 07:01:32 2016 @@ -13,6 +13,8 @@ check against. It also checks that virtual bases work properly */ +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/catch_const_pointer_nullptr.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_const_pointer_nullptr.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_const_pointer_nullptr.pass.cpp (original) +++ libcxxabi/trunk/test/catch_const_pointer_nullptr.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <cassert> #if __has_feature(cxx_nullptr) Modified: libcxxabi/trunk/test/catch_function_01.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_function_01.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_function_01.pass.cpp (original) +++ libcxxabi/trunk/test/catch_function_01.pass.cpp Tue May 31 07:01:32 2016 @@ -12,6 +12,7 @@ // GCC incorrectly allows function pointer to be caught by reference. // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69372 // XFAIL: gcc +// UNSUPPORTED: libcxxabi-no-exceptions #include <cassert> Modified: libcxxabi/trunk/test/catch_function_02.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_function_02.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_function_02.pass.cpp (original) +++ libcxxabi/trunk/test/catch_function_02.pass.cpp Tue May 31 07:01:32 2016 @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // Can you have a catch clause of array type that catches anything? +// UNSUPPORTED: libcxxabi-no-exceptions #include <cassert> Modified: libcxxabi/trunk/test/catch_in_noexcept.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_in_noexcept.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_in_noexcept.pass.cpp (original) +++ libcxxabi/trunk/test/catch_in_noexcept.pass.cpp Tue May 31 07:01:32 2016 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, libcxxabi-no-exceptions #include <exception> #include <stdlib.h> Modified: libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp (original) +++ libcxxabi/trunk/test/catch_member_data_pointer_01.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <cassert> struct A Modified: libcxxabi/trunk/test/catch_member_function_pointer_01.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_member_function_pointer_01.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_member_function_pointer_01.pass.cpp (original) +++ libcxxabi/trunk/test/catch_member_function_pointer_01.pass.cpp Tue May 31 07:01:32 2016 @@ -10,6 +10,7 @@ // GCC incorrectly allows PMF type "void (T::*)()" to be caught as "void (T::*)() const" // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375 // XFAIL: gcc +// UNSUPPORTED: libcxxabi-no-exceptions #include <cassert> struct A Modified: libcxxabi/trunk/test/catch_member_pointer_nullptr.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_member_pointer_nullptr.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_member_pointer_nullptr.pass.cpp (original) +++ libcxxabi/trunk/test/catch_member_pointer_nullptr.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <cassert> #if __has_feature(cxx_nullptr) Modified: libcxxabi/trunk/test/catch_multi_level_pointer.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_multi_level_pointer.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_multi_level_pointer.pass.cpp (original) +++ libcxxabi/trunk/test/catch_multi_level_pointer.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <cassert> #include <cstdlib> #include <iostream> Modified: libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp (original) +++ libcxxabi/trunk/test/catch_pointer_nullptr.pass.cpp Tue May 31 07:01:32 2016 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -// UNSUPPORTED: c++98, c++03 +// UNSUPPORTED: c++98, c++03, libcxxabi-no-exceptions #include <cassert> #include <cstdlib> Modified: libcxxabi/trunk/test/catch_pointer_reference.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_pointer_reference.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_pointer_reference.pass.cpp (original) +++ libcxxabi/trunk/test/catch_pointer_reference.pass.cpp Tue May 31 07:01:32 2016 @@ -25,6 +25,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/catch_ptr.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_ptr.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_ptr.pass.cpp (original) +++ libcxxabi/trunk/test/catch_ptr.pass.cpp Tue May 31 07:01:32 2016 @@ -13,6 +13,8 @@ check against. It also checks that virtual bases work properly */ +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/catch_ptr_02.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/catch_ptr_02.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/catch_ptr_02.pass.cpp (original) +++ libcxxabi/trunk/test/catch_ptr_02.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <cassert> #if __cplusplus < 201103L Added: libcxxabi/trunk/test/cxa_bad_cast.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/cxa_bad_cast.pass.cpp?rev=271267&view=auto ============================================================================== --- libcxxabi/trunk/test/cxa_bad_cast.pass.cpp (added) +++ libcxxabi/trunk/test/cxa_bad_cast.pass.cpp Tue May 31 07:01:32 2016 @@ -0,0 +1,55 @@ +//===----------------------- cxa_bad_cast.pass.cpp ------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 + +#include <cxxabi.h> +#include <cassert> +#include <stdlib.h> +#include <exception> +#include <typeinfo> + +class Base { + virtual void foo() {}; +}; + +class Derived : public Base {}; + +Derived &test_bad_cast(Base b) { + return dynamic_cast<Derived&>(b); +} + +Base gB; + +void my_terminate() { exit(0); } + +int main () +{ + // swap-out the terminate handler + void (*default_handler)() = std::get_terminate(); + std::set_terminate(my_terminate); + +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS + try { +#endif + Derived &d = test_bad_cast(gB); + assert(false); +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS + } catch (std::bad_cast) { + // success + return 0; + } catch (...) { + assert(false); + } +#endif + + // failure, restore the default terminate handler and fire + std::set_terminate(default_handler); + std::terminate(); +} Added: libcxxabi/trunk/test/cxa_bad_typeid.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/cxa_bad_typeid.pass.cpp?rev=271267&view=auto ============================================================================== --- libcxxabi/trunk/test/cxa_bad_typeid.pass.cpp (added) +++ libcxxabi/trunk/test/cxa_bad_typeid.pass.cpp Tue May 31 07:01:32 2016 @@ -0,0 +1,55 @@ +//===----------------------- cxa_bad_typeid.pass.cpp ------------------------===// +// +// 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. +// +//===------------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 + +#include <cxxabi.h> +#include <cassert> +#include <stdlib.h> +#include <exception> +#include <typeinfo> +#include <string> +#include <iostream> + +class Base { + virtual void foo() {}; +}; + +class Derived : public Base {}; + +std::string test_bad_typeid(Derived *p) { + typeid(*p).name(); +} + +void my_terminate() { std::cout << "A" << std::endl; exit(0); } + +int main () +{ + // swap-out the terminate handler + void (*default_handler)() = std::get_terminate(); + std::set_terminate(my_terminate); + +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS + try { +#endif + test_bad_typeid(nullptr); + assert(false); +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS + } catch (std::bad_typeid) { + // success + return 0; + } catch (...) { + assert(false); + } +#endif + + // failure, restore the default terminate handler and fire + std::set_terminate(default_handler); + std::terminate(); +} Modified: libcxxabi/trunk/test/incomplete_type.sh.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/incomplete_type.sh.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/incomplete_type.sh.cpp (original) +++ libcxxabi/trunk/test/incomplete_type.sh.cpp Tue May 31 07:01:32 2016 @@ -14,6 +14,8 @@ // incomplete flags set, equality can be tested by comparing the type_info // addresses. +// UNSUPPORTED: libcxxabi-no-exceptions + // RUN: %cxx %flags %compile_flags -c %s -o %t.one.o // RUN: %cxx %flags %compile_flags -c %s -o %t.two.o -DTU_ONE // RUN: %cxx %flags %t.one.o %t.two.o %link_flags -o %t.exe Modified: libcxxabi/trunk/test/inherited_exception.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/inherited_exception.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/inherited_exception.pass.cpp (original) +++ libcxxabi/trunk/test/inherited_exception.pass.cpp Tue May 31 07:01:32 2016 @@ -25,6 +25,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <assert.h> struct Base { Modified: libcxxabi/trunk/test/libcxxabi/test/config.py URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/libcxxabi/test/config.py?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/libcxxabi/test/config.py (original) +++ libcxxabi/trunk/test/libcxxabi/test/config.py Tue May 31 07:01:32 2016 @@ -35,12 +35,17 @@ class Configuration(LibcxxConfiguration) def configure_features(self): super(Configuration, self).configure_features() + if not self.get_lit_bool('enable_exceptions', True): + self.config.available_features.add('libcxxabi-no-exceptions') if self.get_lit_bool('thread_atexit', True): self.config.available_features.add('thread_atexit') def configure_compile_flags(self): self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER'] - self.cxx.compile_flags += ['-funwind-tables'] + if self.get_lit_bool('enable_exceptions', True): + self.cxx.compile_flags += ['-funwind-tables'] + else: + self.cxx.compile_flags += ['-fno-exceptions', '-DLIBCXXABI_HAS_NO_EXCEPTIONS'] if not self.get_lit_bool('enable_threads', True): self.cxx.compile_flags += ['-DLIBCXXABI_HAS_NO_THREADS=1'] super(Configuration, self).configure_compile_flags() Modified: libcxxabi/trunk/test/lit.site.cfg.in URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/lit.site.cfg.in?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/lit.site.cfg.in (original) +++ libcxxabi/trunk/test/lit.site.cfg.in Tue May 31 07:01:32 2016 @@ -16,6 +16,7 @@ config.executor = "@LIBC config.thread_atexit = "@LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL@" config.libcxxabi_shared = "@LIBCXXABI_ENABLE_SHARED@" config.enable_shared = "@LIBCXX_ENABLE_SHARED@" +config.enable_exceptions = "@LIBCXXABI_ENABLE_EXCEPTIONS@" # Let the main config do the real work. lit_config.load_config(config, "@LIBCXXABI_SOURCE_DIR@/test/lit.cfg") Added: libcxxabi/trunk/test/noexception1.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/noexception1.pass.cpp?rev=271267&view=auto ============================================================================== --- libcxxabi/trunk/test/noexception1.pass.cpp (added) +++ libcxxabi/trunk/test/noexception1.pass.cpp Tue May 31 07:01:32 2016 @@ -0,0 +1,38 @@ +//===----------------------- noexception1.pass.cpp ------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 +// REQUIRES: libcxxabi-no-exceptions + +#include <cxxabi.h> +#include <exception> +#include <cassert> +#include <stdlib.h> + +// namespace __cxxabiv1 { +// void __cxa_increment_exception_refcount(void *thrown_object) throw(); +// } + +unsigned gCounter = 0; + +void my_terminate() { exit(0); } + +int main () +{ + // should not call std::terminate() + __cxxabiv1::__cxa_increment_exception_refcount(nullptr); + + std::set_terminate(my_terminate); + + // should call std::terminate() + __cxxabiv1::__cxa_increment_exception_refcount((void*) &gCounter); + assert(false); + + return 0; +} Added: libcxxabi/trunk/test/noexception2.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/noexception2.pass.cpp?rev=271267&view=auto ============================================================================== --- libcxxabi/trunk/test/noexception2.pass.cpp (added) +++ libcxxabi/trunk/test/noexception2.pass.cpp Tue May 31 07:01:32 2016 @@ -0,0 +1,38 @@ +//===----------------------- noexception2.pass.cpp ------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 +// REQUIRES: libcxxabi-no-exceptions + +#include <cxxabi.h> +#include <exception> +#include <cassert> +#include <stdlib.h> + +// namespace __cxxabiv1 { +// void __cxa_decrement_exception_refcount(void *thrown_object) throw(); +// } + +unsigned gCounter = 0; + +void my_terminate() { exit(0); } + +int main () +{ + // should not call std::terminate() + __cxxabiv1::__cxa_decrement_exception_refcount(nullptr); + + std::set_terminate(my_terminate); + + // should call std::terminate() + __cxxabiv1::__cxa_decrement_exception_refcount((void*) &gCounter); + assert(false); + + return 0; +} Added: libcxxabi/trunk/test/noexception3.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/noexception3.pass.cpp?rev=271267&view=auto ============================================================================== --- libcxxabi/trunk/test/noexception3.pass.cpp (added) +++ libcxxabi/trunk/test/noexception3.pass.cpp Tue May 31 07:01:32 2016 @@ -0,0 +1,38 @@ +//===----------------------- noexception3.pass.cpp ------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++98, c++03 +// REQUIRES: libcxxabi-no-exceptions + +#include <cxxabi.h> +#include <exception> +#include <cassert> +#include <stdlib.h> + +// namespace __cxxabiv1 { +// void __cxa_rethrow_primary_exception(void* thrown_object); +// } + +unsigned gCounter = 0; + +void my_terminate() { exit(0); } + +int main () +{ + // should not call std::terminate() + __cxxabiv1::__cxa_rethrow_primary_exception(nullptr); + + std::set_terminate(my_terminate); + + // should call std::terminate() + __cxxabiv1::__cxa_rethrow_primary_exception((void*) &gCounter); + assert(false); + + return 0; +} Copied: libcxxabi/trunk/test/noexception4.pass.cpp (from r270816, libcxxabi/trunk/test/uncaught_exceptions.pass.cpp) URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/noexception4.pass.cpp?p2=libcxxabi/trunk/test/noexception4.pass.cpp&p1=libcxxabi/trunk/test/uncaught_exceptions.pass.cpp&r1=270816&r2=271267&rev=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/uncaught_exceptions.pass.cpp (original) +++ libcxxabi/trunk/test/noexception4.pass.cpp Tue May 31 07:01:32 2016 @@ -1,4 +1,4 @@ -//===------------------- uncaught_exceptions.pass.cpp ---------------------===// +//===----------------------- noexception4.pass.cpp ------------------------===// // // The LLVM Compiler Infrastructure // @@ -7,30 +7,23 @@ // //===----------------------------------------------------------------------===// +// REQUIRES: libcxxabi-no-exceptions + #include <cxxabi.h> #include <exception> #include <cassert> // namespace __cxxabiv1 { +// void *__cxa_current_primary_exception() throw(); // extern bool __cxa_uncaught_exception () throw(); // extern unsigned int __cxa_uncaught_exceptions() throw(); // } -struct A { - ~A() { assert( __cxxabiv1::__cxa_uncaught_exception()); } - }; - -struct B { - B(int cnt) : data_(cnt) {} - ~B() { assert( data_ == __cxxabiv1::__cxa_uncaught_exceptions()); } - int data_; - }; - int main () { - try { A a; throw 3; assert (false); } - catch (int) {} - - try { B b(1); throw 3; assert (false); } - catch (int) {} + // Trivially + assert(nullptr == __cxxabiv1::__cxa_current_primary_exception()); + assert(!__cxxabiv1::__cxa_uncaught_exception()); + assert(0 == __cxxabiv1::__cxa_uncaught_exceptions()); + return 0; } Modified: libcxxabi/trunk/test/test_aux_runtime.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_aux_runtime.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/test_aux_runtime.pass.cpp (original) +++ libcxxabi/trunk/test/test_aux_runtime.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <typeinfo> #include <iostream> Modified: libcxxabi/trunk/test/test_aux_runtime_op_array_new.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_aux_runtime_op_array_new.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/test_aux_runtime_op_array_new.pass.cpp (original) +++ libcxxabi/trunk/test/test_aux_runtime_op_array_new.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <iostream> #include <cxxabi.h> Modified: libcxxabi/trunk/test/test_guard.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_guard.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/test_guard.pass.cpp (original) +++ libcxxabi/trunk/test/test_guard.pass.cpp Tue May 31 07:01:32 2016 @@ -41,6 +41,7 @@ namespace test1 { // When initialization fails, ensure that we try to initialize it again next // time. namespace test2 { +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS static int run_count = 0; int increment() { ++run_count; @@ -58,6 +59,9 @@ namespace test2 { helper(); assert(run_count == 2); } +#else + void test() {} +#endif } // Check that we can initialize a second value while initializing a first. Modified: libcxxabi/trunk/test/test_vector1.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_vector1.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/test_vector1.pass.cpp (original) +++ libcxxabi/trunk/test/test_vector1.pass.cpp Tue May 31 07:01:32 2016 @@ -47,8 +47,19 @@ int gConstructorCounter; int gConstructorThrowTarget; int gDestructorCounter; int gDestructorThrowTarget; -void throw_construct ( void *p ) { if ( gConstructorCounter == gConstructorThrowTarget ) throw 1; ++gConstructorCounter; } -void throw_destruct ( void *p ) { if ( ++gDestructorCounter == gDestructorThrowTarget ) throw 2; } +void throw_construct ( void *p ) { +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS + if ( gConstructorCounter == gConstructorThrowTarget ) + throw 1; + ++gConstructorCounter; +#endif +} +void throw_destruct ( void *p ) { +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS + if ( ++gDestructorCounter == gDestructorThrowTarget ) + throw 2; +#endif +} #if __cplusplus >= 201103L # define CAN_THROW noexcept(false) @@ -146,6 +157,7 @@ int test_counted ( ) { return retVal; } +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS // Make sure the constructors and destructors are matched int test_exception_in_constructor ( ) { int retVal = 0; @@ -202,7 +214,9 @@ int test_exception_in_constructor ( ) { return retVal; } +#endif +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS // Make sure the constructors and destructors are matched int test_exception_in_destructor ( ) { int retVal = 0; @@ -253,12 +267,15 @@ int test_exception_in_destructor ( ) { return retVal; } +#endif int main ( int argc, char *argv [] ) { int retVal = 0; retVal += test_empty (); retVal += test_counted (); +#ifndef LIBCXXABI_HAS_NO_EXCEPTIONS retVal += test_exception_in_constructor (); retVal += test_exception_in_destructor (); +#endif return retVal; } Modified: libcxxabi/trunk/test/test_vector2.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_vector2.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/test_vector2.pass.cpp (original) +++ libcxxabi/trunk/test/test_vector2.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include "cxxabi.h" #include <iostream> Modified: libcxxabi/trunk/test/test_vector3.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_vector3.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/test_vector3.pass.cpp (original) +++ libcxxabi/trunk/test/test_vector3.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include "cxxabi.h" #include <stdio.h> Modified: libcxxabi/trunk/test/uncaught_exceptions.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/uncaught_exceptions.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/uncaught_exceptions.pass.cpp (original) +++ libcxxabi/trunk/test/uncaught_exceptions.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <cxxabi.h> #include <exception> #include <cassert> Modified: libcxxabi/trunk/test/unwind_01.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_01.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/unwind_01.pass.cpp (original) +++ libcxxabi/trunk/test/unwind_01.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <assert.h> struct A Modified: libcxxabi/trunk/test/unwind_02.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_02.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/unwind_02.pass.cpp (original) +++ libcxxabi/trunk/test/unwind_02.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <assert.h> struct A Modified: libcxxabi/trunk/test/unwind_03.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_03.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/unwind_03.pass.cpp (original) +++ libcxxabi/trunk/test/unwind_03.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/unwind_04.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_04.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/unwind_04.pass.cpp (original) +++ libcxxabi/trunk/test/unwind_04.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/unwind_05.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_05.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/unwind_05.pass.cpp (original) +++ libcxxabi/trunk/test/unwind_05.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> Modified: libcxxabi/trunk/test/unwind_06.pass.cpp URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/unwind_06.pass.cpp?rev=271267&r1=271266&r2=271267&view=diff ============================================================================== --- libcxxabi/trunk/test/unwind_06.pass.cpp (original) +++ libcxxabi/trunk/test/unwind_06.pass.cpp Tue May 31 07:01:32 2016 @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: libcxxabi-no-exceptions + #include <exception> #include <stdlib.h> #include <assert.h> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits