[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGenCXX / ms_struct.cpp
blob1995e3155bd55e7aed2dc4083203a806952c87c6
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__))
6 struct ATTR VBase {
7 virtual void foo() = 0;
8 };
10 struct ATTR Base : virtual VBase {
11 virtual void bar() = 0;
14 struct ATTR Derived : Base {
15 Derived();
16 void foo();
17 void bar();
18 int value;
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) {}