Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / mingw-w64-seh-exceptions.cpp
blob5134a2d887e8d18fcf0cb465cc3411066a724e58
1 // RUN: %clang_cc1 %s -fexceptions -exception-model=seh -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
2 // RUN: %clang_cc1 %s -fexceptions -exception-model=dwarf -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
3 // RUN: %clang_cc1 %s -fexceptions -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
5 extern "C" void foo();
6 extern "C" void bar();
8 struct Cleanup {
9 ~Cleanup() {
10 bar();
14 extern "C" void test() {
15 Cleanup x;
16 foo();
19 // X64: define dso_local void @test()
20 // X64-SAME: personality ptr @__gxx_personality_seh0
21 // X64: invoke void @foo()
22 // X64: landingpad { ptr, i32 }
24 // X86: define dso_local void @test()
25 // X86-SAME: personality ptr @__gxx_personality_v0
26 // X86: invoke void @foo()
27 // X86: landingpad { ptr, i32 }