blob: 7fec810fb731db922d2207805639e37f6d681472 [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
17namespace __cxxabiv1
18{
19
20extern "C"
21{
22
23LIBCXXABI_NORETURN
24void __cxa_bad_cast (void) {
Howard Hinnant25f18072011-06-07 19:56:49 +000025 throw std::bad_cast();
Marshall Clow4c2acbc2011-06-03 02:04:41 +000026}
27
28LIBCXXABI_NORETURN
29void __cxa_bad_typeid(void) {
Howard Hinnant25f18072011-06-07 19:56:49 +000030 throw std::bad_typeid();
Marshall Clow4c2acbc2011-06-03 02:04:41 +000031}
32
Aaron Ballman68fcfa12014-09-11 17:26:43 +000033LIBCXXABI_NORETURN
34void __cxa_throw_bad_array_new_length(void) {
35 throw std::bad_array_new_length();
36}
Marshall Clow4c2acbc2011-06-03 02:04:41 +000037} // extern "C"
38
39} // abi