Skip to content

Commit 2ed68de

Browse files
committed
Tentatively apply libcxxrt/libcxxrt#27.
1 parent a0cf20a commit 2ed68de

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

contrib/libcxxrt/cxxabi.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ __cxa_eh_globals *__cxa_get_globals_fast(void);
204204
std::type_info * __cxa_current_exception_type();
205205

206206

207-
void *__cxa_allocate_exception(size_t thrown_size);
207+
void *__cxa_allocate_exception(size_t thrown_size) throw();
208208

209-
void __cxa_free_exception(void* thrown_exception);
209+
void __cxa_free_exception(void* thrown_exception) throw();
210210

211211
__cxa_exception *__cxa_init_primary_exception(
212-
void *object, std::type_info* tinfo, void (*dest)(void *));
212+
void *object, std::type_info* tinfo, void (*dest)(void *)) throw();
213213

214214
/**
215215
* Throws an exception returned by __cxa_current_primary_exception(). This

contrib/libcxxrt/exception.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex
121121
}
122122

123123

124-
extern "C" void __cxa_free_exception(void *thrown_exception);
124+
extern "C" void __cxa_free_exception(void *thrown_exception) throw();
125125
extern "C" void __cxa_free_dependent_exception(void *thrown_exception);
126126
extern "C" void* __dynamic_cast(const void *sub,
127127
const __class_type_info *src,
@@ -611,7 +611,7 @@ static void free_exception(char *e)
611611
* emergency buffer if malloc() fails, and may block if there are no such
612612
* buffers available.
613613
*/
614-
extern "C" void *__cxa_allocate_exception(size_t thrown_size)
614+
extern "C" void *__cxa_allocate_exception(size_t thrown_size) throw()
615615
{
616616
size_t size = thrown_size + sizeof(__cxa_exception);
617617
char *buffer = alloc_or_die(size);
@@ -633,7 +633,7 @@ extern "C" void *__cxa_allocate_dependent_exception(void)
633633
* In this implementation, it is also called by __cxa_end_catch() and during
634634
* thread cleanup.
635635
*/
636-
extern "C" void __cxa_free_exception(void *thrown_exception)
636+
extern "C" void __cxa_free_exception(void *thrown_exception) throw()
637637
{
638638
__cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
639639
// Free the object that was thrown, calling its destructor
@@ -794,7 +794,7 @@ static void throw_exception(__cxa_exception *ex)
794794
}
795795

796796
extern "C" __cxa_exception *__cxa_init_primary_exception(
797-
void *object, std::type_info* tinfo, void (*dest)(void *)) {
797+
void *object, std::type_info* tinfo, void (*dest)(void *)) throw() {
798798
__cxa_exception *ex = reinterpret_cast<__cxa_exception*>(object) - 1;
799799

800800
ex->referenceCount = 0;

0 commit comments

Comments
 (0)