Debian Codegraph @

clang/test/CodeGenCXX/wasm-em-eh.cpp

raw
1 // RUN: %clang_cc1 %s -triple wasm32-unknown-emscripten -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s
2
3 // Test code generation for Wasm's Emscripten (JavaScript-style) EH.
4
5 void 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 null
12 // CHECK-NEXT: %[[EXN:.*]] = extractvalue { ptr, i32 } %[[LPAD]], 0
13 // CHECK-NEXT: call void @__clang_call_terminate(ptr %[[EXN]])