Path: blob/master/libs/c++abi/src/cxa_aux_runtime.cpp
12346 views
//===------------------------ cxa_aux_runtime.cpp -------------------------===//1//2// The LLVM Compiler Infrastructure3//4// This file is dual licensed under the MIT and the University of Illinois Open5// Source Licenses. See LICENSE.TXT for details.6//7//8// This file implements the "Auxiliary Runtime APIs"9// http://mentorembedded.github.io/cxx-abi/abi-eh.html#cxx-aux10//===----------------------------------------------------------------------===//1112#include "cxxabi.h"13#include <new>14#include <typeinfo>1516namespace __cxxabiv1 {17extern "C" {18_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void) {19#ifndef _LIBCXXABI_NO_EXCEPTIONS20throw std::bad_cast();21#else22std::terminate();23#endif24}2526_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void) {27#ifndef _LIBCXXABI_NO_EXCEPTIONS28throw std::bad_typeid();29#else30std::terminate();31#endif32}3334_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void35__cxa_throw_bad_array_new_length(void) {36#ifndef _LIBCXXABI_NO_EXCEPTIONS37throw std::bad_array_new_length();38#else39std::terminate();40#endif41}42} // extern "C"43} // abi444546