Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / ms-thunks-ehspec.cpp
blobc988e24e94cc5ffbd5ee93c1e50f4df2d331d7ad
1 // RUN: %clang_cc1 -fexceptions -fcxx-exceptions %s -triple=i686-windows-msvc -emit-llvm -o - | FileCheck %s
3 // When generating thunks using musttail due to inalloca parameters, don't push
4 // and pop terminate scopes. PR44987
6 struct NonTrivial {
7 NonTrivial();
8 NonTrivial(const NonTrivial &o);
9 ~NonTrivial();
10 int x;
12 struct A {
13 virtual void f(NonTrivial o) noexcept;
15 struct B {
16 virtual void f(NonTrivial o) noexcept;
18 class C : A, B {
19 virtual void f(NonTrivial o) noexcept;
21 C c;
23 // CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @"?f@C@@G3AEXUNonTrivial@@@Z"(ptr noundef %this, ptr inalloca(<{ %struct.NonTrivial }>) %0)
24 // CHECK-NOT: invoke
25 // CHECK: musttail call x86_thiscallcc void @"?f@C@@EAEXUNonTrivial@@@Z"(ptr noundef %{{.*}}, ptr inalloca(<{ %struct.NonTrivial }>) %0)
26 // CHECK-NEXT: ret void