aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2025-01-09 22:36:10 -0800
committerGitHub <noreply@github.com>2025-01-09 22:36:10 -0800
commita8e1135baa9074f7c088c8e1999561f88699b56e (patch)
tree6ddc661803707e8f68cfae6a4e86e920737061aa /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parenta531800344dc54e9c197a13b22e013f919f3f5e1 (diff)
downloadllvm-a8e1135baa9074f7c088c8e1999561f88699b56e.zip
llvm-a8e1135baa9074f7c088c8e1999561f88699b56e.tar.gz
llvm-a8e1135baa9074f7c088c8e1999561f88699b56e.tar.bz2
[WebAssembly] Add -wasm-use-legacy-eh option (#122158)
This replaces the existing `-wasm-enable-exnref` with `-wasm-use-legacy-eh` option, in an effort to make the new standardized exnref proposal the 'default' state and the legacy proposal needs to be separately enabled an option. But given that most users haven't switched to the new proposal and major web browsers haven't turned it on by default, this `-wasm-use-legacy-eh` is turned on by default, so nothing will change for now for the functionality perspective. This also removes the restriction that `-wasm-enable-exnref` be only used with `-wasm-enable-eh` because this option is enabled by default. This option does not have any effect when `-wasm-enable-eh` is not used.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index 9c95d73..ba8c479 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -400,8 +400,8 @@ FunctionPass *WebAssemblyPassConfig::createTargetRegisterAllocator(bool) {
using WebAssembly::WasmEnableEH;
using WebAssembly::WasmEnableEmEH;
using WebAssembly::WasmEnableEmSjLj;
-using WebAssembly::WasmEnableExnref;
using WebAssembly::WasmEnableSjLj;
+using WebAssembly::WasmUseLegacyEH;
static void basicCheckForEHAndSjLj(TargetMachine *TM) {
@@ -417,9 +417,6 @@ static void basicCheckForEHAndSjLj(TargetMachine *TM) {
if (WasmEnableEmEH && WasmEnableSjLj)
report_fatal_error(
"-enable-emscripten-cxx-exceptions not allowed with -wasm-enable-sjlj");
- if (WasmEnableExnref && !WasmEnableEH)
- report_fatal_error(
- "-wasm-enable-exnref should be used with -wasm-enable-eh");
// Here we make sure TargetOptions.ExceptionModel is the same as
// MCAsmInfo.ExceptionsType. Normally these have to be the same, because clang