1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
3 #pragma GCC diagnostic ignored "-Wincompatible-ms-struct"
4 #define ATTR __attribute__((__ms_struct__))
7 virtual void foo() = 0;
10 struct ATTR Base
: virtual VBase
{
11 virtual void bar() = 0;
14 struct ATTR Derived
: Base
{
21 // CHECK: [[DERIVED:%.*]] = type <{ [[BASE:%.*]], i32, [4 x i8] }>
22 // CHECK: [[BASE]] = type { [[VBASE:%.*]] }
23 // CHECK: [[VBASE]] = type { ptr }
25 // CHECK: define{{.*}} void @_ZN7DerivedC2Ev
26 // CHECK: [[SELF:%.*]] = load ptr
27 // CHECK: call void @_ZN4BaseC2Ev(ptr {{[^,]*}} [[SELF]], ptr
28 // CHECK: [[T0:%.*]] = getelementptr inbounds {{.*}} [[SELF]], i32 0, i32 1
29 // CHECK: store i32 20, ptr [[T0]],
30 Derived::Derived() : value(20) {}