diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-03-24 06:06:58 -0700 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2021-03-24 12:27:49 -0700 |
commit | a6aae5f7fcd1111db87bfe77072912484213f872 (patch) | |
tree | 4b1f47098b00e29b5e26f83ab2f210ab034f589a /clang/unittests/Tooling/CompilationDatabaseTest.cpp | |
parent | 9d4557927999601f77e9fa9d0906cd5362d5f4ee (diff) | |
download | llvm-a6aae5f7fcd1111db87bfe77072912484213f872.zip llvm-a6aae5f7fcd1111db87bfe77072912484213f872.tar.gz llvm-a6aae5f7fcd1111db87bfe77072912484213f872.tar.bz2 |
[WebAssembly] Don't inline -emscripten-cxx-exceptions-allowed functions
Functions specified in `-emscripten-cxx-exceptions-allowed`, which is
set by Emscripten's `EXCEPTION_CATCHING_ALLOWED` setting, can be inlined
in LLVM middle ends before we reach WebAssemblyLowerEmscriptenEHSjLj
pass in the wasm backend and thus don't get transformed for exception
catching.
This fixes the issue by adding `--force-attribute=FUNC_NAME:noinline`
for each function name in `-emscripten-cxx-exceptions-allowed`, which
adds `noinline` attribute to the specified function and thus excludes
the function from inlining candidates in optimization passes.
Fixes the remaining half of
https://github.com/emscripten-core/emscripten/issues/10721.
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D99259
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
0 files changed, 0 insertions, 0 deletions