brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · ae7ad64 Raw
55 lines · plain
1; RUN: not --crash llc < %s -enable-emscripten-cxx-exceptions -mattr=+multivalue -target-abi=experimental-mv 2>&1 | FileCheck %s --check-prefix=EH2; RUN: not --crash llc < %s -enable-emscripten-sjlj -mattr=+multivalue -target-abi=experimental-mv 2>&1 | FileCheck %s --check-prefix=SJLJ3 4; Currently multivalue returning functions are not supported in Emscripten EH /5; SjLj. Make sure they error out.6 7target triple = "wasm32-unknown-unknown"8 9%struct.__jmp_buf_tag = type { [6 x i32], i32, [32 x i32] }10 11define void @exception() personality ptr @__gxx_personality_v0 {12entry:13  invoke {i32, i32} @foo(i32 3)14          to label %try.cont unwind label %lpad15 16lpad:                                             ; preds = %entry17  %1 = landingpad { ptr, i32 }18          catch ptr null19  %2 = extractvalue { ptr, i32 } %1, 020  %3 = extractvalue { ptr, i32 } %1, 121  %4 = call ptr @__cxa_begin_catch(ptr %2) #222  call void @__cxa_end_catch()23  br label %try.cont24 25try.cont:                                         ; preds = %entry, %lpad26  ret void27}28 29define void @setjmp_longjmp() {30entry:31  %buf = alloca [1 x %struct.__jmp_buf_tag], align 1632  %call = call i32 @setjmp(ptr %buf) #033  call {i32, i32} @foo(i32 3)34  call void @longjmp(ptr %buf, i32 1) #135  unreachable36}37 38declare {i32, i32} @foo(i32)39declare i32 @__gxx_personality_v0(...)40declare ptr @__cxa_begin_catch(ptr)41declare void @__cxa_end_catch()42; Function Attrs: returns_twice43declare i32 @setjmp(ptr) #044; Function Attrs: noreturn45declare void @longjmp(ptr, i32) #146declare ptr @malloc(i32)47declare void @free(ptr)48 49attributes #0 = { returns_twice }50attributes #1 = { noreturn }51attributes #2 = { nounwind }52 53; EH: LLVM ERROR: Emscripten EH/SjLj does not support multivalue returns54; SJLJ: LLVM ERROR: Emscripten EH/SjLj does not support multivalue returns55