Skip to content

Commit 1801e94

Browse files
authored
[EH] Add comment on __cxa_init_primary_exception in cxa_noexception.cpp (#22034)
1 parent 67fa4c1 commit 1801e94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

system/lib/libcxxabi/src/cxa_noexception.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ void __cxa_free_exception(void *thrown_object) throw() {
7575
free((void *)raw_buffer);
7676
}
7777

78+
// This function is called from make_exception_ptr in libcxx unless
79+
// -fno-exceptions is not given. We have definitions of this function in
80+
// cxa_exception.cpp and cxa_exception_emscripten.cpp, but unlike other
81+
// platforms, we use those files only when one of Emscripten EH or Wasm EH is
82+
// used, and we use this cxa_noexceptions.cpp in case of -fignore-exceptions,
83+
// which is our default. So we add a definition here to prevent a link failure.
7884
__cxa_exception*
7985
__cxa_init_primary_exception(void* object,
8086
std::type_info* tinfo,

0 commit comments

Comments
 (0)