xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
2f4a2713aSLionel Sambuc 
3f4a2713aSLionel Sambuc struct A { int i; };
4f4a2713aSLionel Sambuc struct B { char j; };
5f4a2713aSLionel Sambuc struct C : A, B { int k; };
6f4a2713aSLionel Sambuc 
7f4a2713aSLionel Sambuc struct D final : virtual C {
8f4a2713aSLionel Sambuc   D();
9f4a2713aSLionel Sambuc   virtual void f();
10f4a2713aSLionel Sambuc };
11f4a2713aSLionel Sambuc 
12*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.B* @_Z1fR1D
f(D & d)13f4a2713aSLionel Sambuc B &f(D &d) {
14f4a2713aSLionel Sambuc   // CHECK-NOT: load i8**
15f4a2713aSLionel Sambuc   return d;
16f4a2713aSLionel Sambuc }
17