brintos

brintos / llvm-project-archived public Read only

0
0
Text · 539 B · fc96fa9 Raw
14 lines · cpp
1// RUN: %clang_cc1 %s -triple wasm32-unknown-emscripten -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s2 3// Test code generation for Wasm's Emscripten (JavaScript-style) EH.4 5void noexcept_throw() noexcept {6  throw 3;7}8 9// CATCH-LABEL: define void @_Z14noexcept_throwv()10// CHECK:       %[[LPAD:.*]] = landingpad { ptr, i32 }11// CHECK-NEXT:                    catch ptr null12// CHECK-NEXT:  %[[EXN:.*]] = extractvalue { ptr, i32 } %[[LPAD]], 013// CHECK-NEXT:  call void @__clang_call_terminate(ptr %[[EXN]])14