| 1 |
// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s |
| 2 |
|
| 3 |
struct A { |
| 4 |
constexpr A(int x) : x(x) {} |
| 5 |
virtual void f(); |
| 6 |
int x; |
| 7 |
}; |
| 8 |
|
| 9 |
A a(42); |
| 10 |
// CHECK: @"?a@@3UA@@A" = dso_local global %struct.A { ptr @"??_7A@@6B@", i32 42 }, align 4 |
| 11 |
|
| 12 |
struct B { |
| 13 |
constexpr B(int y) : y(y) {} |
| 14 |
virtual void g(); |
| 15 |
int y; |
| 16 |
}; |
| 17 |
|
| 18 |
struct C : A, B { |
| 19 |
constexpr C() : A(777), B(13) {} |
| 20 |
}; |
| 21 |
|
| 22 |
C c; |
| 23 |
// CHECK: @"?c@@3UC@@A" = dso_local global { ptr, i32, ptr, i32 } { ptr @"??_7C@@6BA@@@", i32 777, ptr @"??_7C@@6BB@@@", i32 13 } |