1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-exceptions
11 // __cxa_uncaught_exceptions is not re-exported from libc++ until LLVM 9.
12 // XFAIL: using-built-library-before-llvm-9
17 // namespace __cxxabiv1 {
18 // extern unsigned int __cxa_uncaught_exceptions() throw();
22 A(unsigned cnt
) : data_(cnt
) {}
23 ~A() { assert( data_
== __cxxabiv1::__cxa_uncaught_exceptions()); }
28 try { A
a(1); throw 3; assert(false); }