Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / windows-seh-EHa-CppCatchReturn.cpp
blob822c629bc207f7127d6395c01f9b7d49d5b0056f
1 // RUN: %clang_cc1 -triple x86_64-windows -fasync-exceptions -fcxx-exceptions -fexceptions -fms-extensions -x c++ -Wno-implicit-function-declaration -S -emit-llvm %s -o - | FileCheck %s
3 // CHECK: define dso_local void @"?foo@@YAXXZ
4 // CHECK: invoke void @llvm.seh.try.begin()
5 // CHECK-NOT: llvm.seh.scope.begin
6 // CHECK-NOT: llvm.seh.scope.end
8 // FIXME: Do we actually need llvm.seh.scope*?
9 void foo() {
10 try {}
11 catch (...) {
12 return;
16 __declspec(noreturn) void bar();
17 class baz {
18 public:
19 ~baz();
22 // CHECK: define dso_local void @"?qux@@YAXXZ
23 // CHECK: invoke void @llvm.seh.scope.begin()
24 // CHECK-NOT: llvm.seh.try
25 // CHECK-NOT: llvm.seh.scope.end
27 // We don't need to generate llvm.seh.scope.end for unreachable.
28 void qux() {
29 baz a;
30 bar();