Skip to content

Commit 2bc97e8

Browse files
committed
[EH] Rename format_exception.cpp
I think we need a separate file in libc++abi for 'our' EH, meaning both Emscripten EH and Wasm EH. (I think they can be in the same file, as long as we have `ifdef`s) This also adds a file header. I think this method can be in that file, rather than having a separate file for this. I named this `cxa_emscripten.cpp` because it's the name emscripten-core#16627 used and I hope we can put all Emscripten specific stuff there, but maybe @sbc100 had another thought; if so let me know.
1 parent 5c4a24f commit 2bc97e8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

system/lib/libcxxabi/src/format_exception.cpp renamed to system/lib/libcxxabi/src/cxa_emscripten.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
//===------------------------- cxa_emscripten.cpp -------------------------===//
2+
//
3+
// This code contains Emscripten specific code for exception handling.
4+
// Emscripten has two modes of exception handling: Emscripten EH, which uses JS
5+
// glue code, and Wasm EH, which uses the new Wasm exception handling proposal
6+
// and meant to be faster. Code for different modes is demarcated with
7+
// '__USING_EMSCRIPTEN_EXCEPTIONS__' and '__USING_WASM_EXCEPTIONS__'.
8+
//
9+
//===----------------------------------------------------------------------===//
10+
111
#include "cxa_exception.h"
212
#include "private_typeinfo.h"
313
#include <stdio.h>

tools/system_libs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ def get_files(self):
12031203
'stdlib_stdexcept.cpp',
12041204
'stdlib_typeinfo.cpp',
12051205
'private_typeinfo.cpp',
1206-
'format_exception.cpp',
1206+
'cxa_emscripten.cpp',
12071207
]
12081208
if self.eh_mode == Exceptions.NONE:
12091209
filenames += ['cxa_noexception.cpp']

0 commit comments

Comments
 (0)