Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-interface.cpp
blobd70caa15ed3c18a9e8f6ca0e3c1b01df27c14356
1 // RUN: %clang_cc1 -std=c++11 -fms-extensions -Wno-microsoft -triple=i386-pc-windows-gnu -emit-llvm %s -o - | FileCheck %s
3 __interface I {
4 int test() {
5 return 1;
7 };
9 struct S : I {
10 virtual int test() override {
11 return I::test();
15 int fn() {
16 S s;
17 return s.test();
20 // CHECK: @_ZTV1S = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI1S, ptr @_ZN1S4testEv] }
22 // CHECK-LABEL: define dso_local noundef i32 @_Z2fnv()
23 // CHECK: call x86_thiscallcc void @_ZN1SC1Ev(ptr {{[^,]*}} %s)
24 // CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef i32 @_ZN1S4testEv(ptr {{[^,]*}} %s)
26 // CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1SC1Ev(ptr {{[^,]*}} %this)
27 // CHECK: call x86_thiscallcc void @_ZN1SC2Ev(ptr {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
29 // CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc noundef i32 @_ZN1S4testEv(ptr {{[^,]*}} %this)
30 // CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef i32 @_ZN1I4testEv(ptr {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
32 // CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1SC2Ev(ptr {{[^,]*}} %this)
33 // CHECK: call x86_thiscallcc void @_ZN1IC2Ev(ptr {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
34 // CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1S, i32 0, inrange i32 0, i32 2), ptr %{{[.0-9A-Z_a-z]+}}
36 // CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1IC2Ev(ptr {{[^,]*}} %this)
37 // CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1I, i32 0, inrange i32 0, i32 2), ptr %{{[.0-9A-Z_a-z]+}}
39 // CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc noundef i32 @_ZN1I4testEv(ptr {{[^,]*}} %this)
40 // CHECK: ret i32 1