xref: /llvm-project/llvm/test/CodeGen/WebAssembly/eh-option-errors.ll (revision a8e1135baa9074f7c088c8e1999561f88699b56e)
1*08de0b3cSHeejin Ahntarget triple = "wasm32-unknown-unknown"
2*08de0b3cSHeejin Ahn
3*08de0b3cSHeejin Ahn; RUN: not --crash llc < %s -enable-emscripten-cxx-exceptions -wasm-enable-eh 2>&1 | FileCheck %s --check-prefix=EM_EH_W_WASM_EH
4*08de0b3cSHeejin Ahn; EM_EH_W_WASM_EH: LLVM ERROR: -enable-emscripten-cxx-exceptions not allowed with -wasm-enable-eh
5*08de0b3cSHeejin Ahn
6*08de0b3cSHeejin Ahn; RUN: not --crash llc < %s -enable-emscripten-sjlj -wasm-enable-sjlj 2>&1 | FileCheck %s --check-prefix=EM_SJLJ_W_WASM_SJLJ
7*08de0b3cSHeejin Ahn; EM_SJLJ_W_WASM_SJLJ: LLVM ERROR: -enable-emscripten-sjlj not allowed with -wasm-enable-sjlj
8*08de0b3cSHeejin Ahn
9*08de0b3cSHeejin Ahn; RUN: not --crash llc < %s -enable-emscripten-cxx-exceptions -wasm-enable-sjlj 2>&1 | FileCheck %s --check-prefix=EM_EH_W_WASM_SJLJ
10*08de0b3cSHeejin Ahn; EM_EH_W_WASM_SJLJ: LLVM ERROR: -enable-emscripten-cxx-exceptions not allowed with -wasm-enable-sjlj
11*08de0b3cSHeejin Ahn
12*08de0b3cSHeejin Ahn; RUN: not --crash llc < %s -wasm-enable-eh -exception-model=dwarf 2>&1 | FileCheck %s --check-prefix=EH_MODEL_DWARF
13*08de0b3cSHeejin Ahn; EH_MODEL_DWARF: LLVM ERROR: -exception-model should be either 'none' or 'wasm'
14*08de0b3cSHeejin Ahn
15*08de0b3cSHeejin Ahn; RUN: not --crash llc < %s -enable-emscripten-cxx-exceptions -exception-model=wasm 2>&1 | FileCheck %s --check-prefix=EM_EH_W_MODEL_WASM
16*08de0b3cSHeejin Ahn; EM_EH_W_MODEL_WASM: LLVM ERROR: -exception-model=wasm not allowed with -enable-emscripten-cxx-exceptions
17*08de0b3cSHeejin Ahn
18*08de0b3cSHeejin Ahn; RUN: not --crash llc < %s -exception-model=wasm 2>&1 | FileCheck %s --check-prefix=MODEL_WASM_WO_WASM_EH_SJLJ
19*08de0b3cSHeejin Ahn; MODEL_WASM_WO_WASM_EH_SJLJ: LLVM ERROR: -exception-model=wasm only allowed with at least one of -wasm-enable-eh or -wasm-enable-sjlj
20