blob: ad68e61117a68c48f9c782eadc3a96850ea593fd [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" {
19LIBCXXABI_NORETURN
20void __cxa_bad_cast(void) { throw std::bad_cast(); }
Marshall Clow4c2acbc2011-06-03 02:04:41 +000021
22LIBCXXABI_NORETURN
Saleem Abdulrasool77a304b2015-12-04 02:14:41 +000023void __cxa_bad_typeid(void) { throw std::bad_typeid(); }
Marshall Clow4c2acbc2011-06-03 02:04:41 +000024
Aaron Ballman68fcfa12014-09-11 17:26:43 +000025LIBCXXABI_NORETURN
26void __cxa_throw_bad_array_new_length(void) {
Saleem Abdulrasool77a304b2015-12-04 02:14:41 +000027 throw std::bad_array_new_length();
Aaron Ballman68fcfa12014-09-11 17:26:43 +000028}
Saleem Abdulrasool77a304b2015-12-04 02:14:41 +000029} // extern "C"
30} // abi