2020-02-04 02:09:39 +08:00
|
|
|
// RUN: %clang_cc1 -triple=i686 -emit-llvm -o - %s | FileCheck %s
|
2018-12-07 16:17:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
struct X;
|
|
|
|
typedef void (X::*memptr)();
|
|
|
|
|
|
|
|
struct A {
|
|
|
|
virtual memptr f();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct B {
|
|
|
|
virtual memptr f();
|
|
|
|
};
|
|
|
|
|
|
|
|
struct C : A, B {
|
|
|
|
C();
|
|
|
|
memptr f() override __attribute__((noinline)) { return nullptr; };
|
|
|
|
};
|
|
|
|
|
|
|
|
C::C() {}
|
|
|
|
|
|
|
|
// Make sure the member pointer is returned from the thunk via the return slot.
|
|
|
|
// Because of the tail call, the return value cannot be copied into a local
|
|
|
|
// alloca. (PR39901)
|
|
|
|
|
2021-05-13 19:48:26 +08:00
|
|
|
// CHECK-LABEL: define linkonce_odr void @_ZThn4_N1C1fEv({ i32, i32 }* noalias sret({ i32, i32 }) align 4 %agg.result, %struct.C* %this)
|
2020-09-29 21:33:55 +08:00
|
|
|
// CHECK: tail call void @_ZN1C1fEv({ i32, i32 }* sret({ i32, i32 }) align 4 %agg.result
|