2017-11-29 15:25:12 +08:00
|
|
|
// RUN: %clang_cc1 %s -fexceptions -fseh-exceptions -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
|
|
|
|
// RUN: %clang_cc1 %s -fexceptions -fdwarf-exceptions -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();
|
|
|
|
}
|
|
|
|
|
2014-11-14 10:01:10 +08:00
|
|
|
// X64: define 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
|
|
|
|
|
|
|
// X86: define 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 }
|