brintos

brintos / llvm-project-archived public Read only

0
0
Text · 562 B · a3b2875 Raw
33 lines · cpp
1// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s2 3struct A {4  virtual int f() { return 1; }5};6 7struct B {8  virtual int f() { return 2; }9};10 11struct C : A, B {12  virtual int f() { return 3; }13};14 15struct D : C {16  virtual int f() { return 4; }17};18 19static int f(D* d) {20  B* b = d;21  return b->f();22};23 24int g() {25  D d;26  return f(&d);27}28 29// Thunks should be marked as "linkonce ODR" not "weak".30//31// CHECK: define linkonce_odr noundef i32 @_ZThn{{[48]}}_N1D1fEv32// CHECK: define linkonce_odr noundef i32 @_ZThn{{[48]}}_N1C1fEv33