2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
|
2013-09-27 22:48:01 +08:00
|
|
|
|
|
|
|
struct A {
|
|
|
|
constexpr A(int x) : x(x) {}
|
|
|
|
virtual void f();
|
|
|
|
int x;
|
|
|
|
};
|
|
|
|
|
|
|
|
A a(42);
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK: @"?a@@3UA@@A" = dso_local global { { [1 x i8*] }*, i32 } { { [1 x i8*] }* @"??_7A@@6B@", i32 42 }, align 4
|
2013-09-27 22:48:01 +08:00
|
|
|
|
|
|
|
struct B {
|
|
|
|
constexpr B(int y) : y(y) {}
|
|
|
|
virtual void g();
|
|
|
|
int y;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct C : A, B {
|
|
|
|
constexpr C() : A(777), B(13) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
C c;
|
2018-03-17 04:36:49 +08:00
|
|
|
// CHECK: @"?c@@3UC@@A" = dso_local global { { [1 x i8*] }*, i32, { [1 x i8*] }*, i32 } { { [1 x i8*] }* @"??_7C@@6BA@@@", i32 777, { [1 x i8*] }* @"??_7C@@6BB@@@", i32 13 }
|