[llvm-branch-commits] [llvm] WebAssembly: Use reportFatalUsageError for eh option errors (PR #233031)
Jay Foad via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 23 04:20:28 PDT 2026
================
@@ -1,13 +1,37 @@
-target triple = "wasm32-unknown-unknown"
+; RUN: split-file %s %t
-; RUN: not --crash llc < %s -enable-emscripten-sjlj -wasm-enable-sjlj 2>&1 | FileCheck %s --check-prefix=EM_SJLJ_W_WASM_SJLJ
+; RUN: not llc < %t/noflag.ll -enable-emscripten-sjlj -wasm-enable-sjlj 2>&1 | FileCheck %s --check-prefix=EM_SJLJ_W_WASM_SJLJ
; EM_SJLJ_W_WASM_SJLJ: LLVM ERROR: -enable-emscripten-sjlj not allowed with -wasm-enable-sjlj
-; RUN: not --crash llc < %s -exception-model=emscripten -wasm-enable-sjlj 2>&1 | FileCheck %s --check-prefix=EM_EH_W_WASM_SJLJ
+; RUN: not llc < %t/noflag.ll -exception-model=emscripten -wasm-enable-sjlj 2>&1 | FileCheck %s --check-prefix=EM_EH_W_WASM_SJLJ
+; RUN: not opt -passes=wasm-lower-em-ehsjlj -wasm-enable-sjlj -disable-output %t/emscripten.ll 2>&1 | FileCheck %s --check-prefix=EM_EH_W_WASM_SJLJ
; EM_EH_W_WASM_SJLJ: LLVM ERROR: -exception-model=emscripten not allowed with -wasm-enable-sjlj
----------------
jayfoad wrote:
Nit: the error message text is misleading now (and since #232977) because in the opt case there was no "-exception-model=" option. Claude suggested "the 'emscripten' exception model is not allowed with -wasm-enable-sjlj".
https://github.com/llvm/llvm-project/pull/233031
More information about the llvm-branch-commits
mailing list