Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / exceptions-cxx-ehsc.cpp
blob0a77523a3557fe1251125e397884216652843707
1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fexceptions -fcxx-exceptions -fexternc-nounwind -Wno-dynamic-exception-spec %std_cxx98- | FileCheck %s
3 namespace test1 {
4 struct Cleanup { ~Cleanup(); };
5 extern "C" void never_throws();
6 void may_throw();
8 void caller() {
9 Cleanup x;
10 never_throws();
11 may_throw();
14 // CHECK-LABEL: define dso_local void @"?caller@test1@@YAXXZ"(
15 // CHECK: call void @never_throws(
16 // CHECK: invoke void @"?may_throw@test1@@YAXXZ"(
18 namespace test2 {
19 struct Cleanup { ~Cleanup(); };
20 extern "C" void throws_int() throw(int);
21 void may_throw();
23 void caller() {
24 Cleanup x;
25 throws_int();
26 may_throw();
29 // CHECK-LABEL: define dso_local void @"?caller@test2@@YAXXZ"(
30 // CHECK: invoke void @throws_int(
31 // CHECK: invoke void @"?may_throw@test2@@YAXXZ"(