blob: a455fad6219ece250d54ea44d55a07d177f9a7e8 [file] [log] [blame]
Marshall Clow4c2acbc2011-06-03 02:04:41 +00001//===------------------------ cxa_aux_runtime.cpp -------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
Howard Hinnant25f18072011-06-07 19:56:49 +00008//
9// This file implements the "Auxiliary Runtime APIs"
Jonathan Roelofsc82e02d2014-02-12 04:49:09 +000010// http://mentorembedded.github.io/cxx-abi/abi-eh.html#cxx-aux
Marshall Clow4c2acbc2011-06-03 02:04:41 +000011//===----------------------------------------------------------------------===//
12
13#include "cxxabi.h"
Aaron Ballman68fcfa12014-09-11 17:26:43 +000014#include <new>
Marshall Clow4c2acbc2011-06-03 02:04:41 +000015#include <typeinfo>
16
Saleem Abdulrasool77a304b2015-12-04 02:14:41 +000017namespace __cxxabiv1 {
18extern "C" {
Saleem Abdulrasoolb4ec5792015-12-04 02:14:58 +000019_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void) {
20 throw std::bad_cast();
21}
Marshall Clow4c2acbc2011-06-03 02:04:41 +000022
Saleem Abdulrasoolb4ec5792015-12-04 02:14:58 +000023_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_typeid(void) {
24 throw std::bad_typeid();
25}
Marshall Clow4c2acbc2011-06-03 02:04:41 +000026
Saleem Abdulrasoolb4ec5792015-12-04 02:14:58 +000027_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void
28__cxa_throw_bad_array_new_length(void) {
Saleem Abdulrasool77a304b2015-12-04 02:14:41 +000029 throw std::bad_array_new_length();
Aaron Ballman68fcfa12014-09-11 17:26:43 +000030}
Saleem Abdulrasool77a304b2015-12-04 02:14:41 +000031} // extern "C"
32} // abi