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
8 // This file implements the "Auxiliary Runtime APIs"
9 // https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html#cxx-aux
10 //===----------------------------------------------------------------------===//
16 namespace __cxxabiv1
{
18 _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN
void __cxa_bad_cast(void) {
19 #ifndef _LIBCXXABI_NO_EXCEPTIONS
20 throw std::bad_cast();
26 _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN
void __cxa_bad_typeid(void) {
27 #ifndef _LIBCXXABI_NO_EXCEPTIONS
28 throw std::bad_typeid();
34 _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN
void
35 __cxa_throw_bad_array_new_length(void) {
36 #ifndef _LIBCXXABI_NO_EXCEPTIONS
37 throw std::bad_array_new_length();