Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / thunk-linkonce-odr.cpp
bloba3b2875d25e1b5bbd6c99df2cfced13d7131e44d
1 // RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
3 struct A {
4 virtual int f() { return 1; }
5 };
7 struct B {
8 virtual int f() { return 2; }
9 };
11 struct C : A, B {
12 virtual int f() { return 3; }
15 struct D : C {
16 virtual int f() { return 4; }
19 static int f(D* d) {
20 B* b = d;
21 return b->f();
24 int g() {
25 D d;
26 return f(&d);
29 // Thunks should be marked as "linkonce ODR" not "weak".
31 // CHECK: define linkonce_odr noundef i32 @_ZThn{{[48]}}_N1D1fEv
32 // CHECK: define linkonce_odr noundef i32 @_ZThn{{[48]}}_N1C1fEv