blob: bacddb2936f4b72465c4267dfd1a3d30a1a3a446 [file] [log] [blame]
Reid Klecknere070b992014-11-14 02:01:10 +00001// RUN: %clang_cc1 %s -fexceptions -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
2// RUN: %clang_cc1 %s -fexceptions -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
Reid Kleckner8f45c9c2014-09-15 17:19:16 +00003
4extern "C" void foo();
5extern "C" void bar();
6
7struct Cleanup {
8 ~Cleanup() {
9 bar();
10 }
11};
12
13extern "C" void test() {
14 Cleanup x;
15 foo();
16}
17
Reid Klecknere070b992014-11-14 02:01:10 +000018// X64: define void @test()
19// X64: invoke void @foo()
20// X64: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_seh0 to i8*)
21
22// X86: define void @test()
23// X86: invoke void @foo()
24// X86: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)