1 // RUN: %clang_cc1 -triple i686-windows-msvc   -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s
2 struct Base {};
3 
4 // __declspec(dllexport) causes us to export the implicit constructor.
5 struct __declspec(dllexport) Derived : virtual Base {
6 // CHECK-LABEL: define weak_odr dllexport x86_thiscallcc %struct.Derived* @"\01??0Derived@@QAE@ABU0@@Z"
7 // CHECK:      %[[this:.*]] = load %struct.Derived** {{.*}}
8 // CHECK-NEXT: store %struct.Derived* %[[this]], %struct.Derived** %[[retval:.*]]
9 // CHECK:      %[[dest_a_gep:.*]] = getelementptr inbounds %struct.Derived* %[[this]], i32 0, i32 1
10 // CHECK-NEXT: %[[src_load:.*]]   = load %struct.Derived** {{.*}}
11 // CHECK-NEXT: %[[src_a_gep:.*]]  = getelementptr inbounds %struct.Derived* %[[src_load:.*]], i32 0, i32 1
12 // CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %[[dest_a_gep]], i8* %[[src_a_gep]], i64 1, i32 4, i1 false)
13 // CHECK-NEXT: %[[dest_this:.*]] = load %struct.Derived** %[[retval]]
14 // CHECK-NEXT: ret %struct.Derived* %[[dest_this]]
15   bool a : 1;
16   bool b : 1;
17 };
18