2020-12-15 16:59:19 +08:00
|
|
|
// RUN: %clang_cc1 %s -fexceptions -exception-model=seh -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
|
|
|
|
// RUN: %clang_cc1 %s -fexceptions -exception-model=dwarf -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
|
2014-11-14 10:01:10 +08:00
|
|
|
// RUN: %clang_cc1 %s -fexceptions -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
|
2014-09-16 01:19:16 +08:00
|
|
|
|
|
|
|
extern "C" void foo();
|
|
|
|
extern "C" void bar();
|
|
|
|
|
|
|
|
struct Cleanup {
|
|
|
|
~Cleanup() {
|
|
|
|
bar();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern "C" void test() {
|
|
|
|
Cleanup x;
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
2018-02-24 03:30:48 +08:00
|
|
|
// X64: define dso_local void @test()
|
2015-06-18 04:53:19 +08:00
|
|
|
// X64-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_seh0 to i8*)
|
2014-11-14 10:01:10 +08:00
|
|
|
// X64: invoke void @foo()
|
2015-06-18 04:53:19 +08:00
|
|
|
// X64: landingpad { i8*, i32 }
|
2014-11-14 10:01:10 +08:00
|
|
|
|
2018-02-24 03:30:48 +08:00
|
|
|
// X86: define dso_local void @test()
|
2015-06-18 04:53:19 +08:00
|
|
|
// X86-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
|
2014-11-14 10:01:10 +08:00
|
|
|
// X86: invoke void @foo()
|
2015-06-18 04:53:19 +08:00
|
|
|
// X86: landingpad { i8*, i32 }
|