blob: 0f6849cf54938e7432c239acc347f0cc2d56b46b [file] [log] [blame]
Fariborz Jahaniand172e912009-08-17 19:04:50 +00001// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -O0 -S %s -o %t-64.s &&
2// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
3// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -O0 -S %s -o %t-32.s &&
4// RUN: FileCheck -check-prefix LP32 -input-file=%t-32.s %s &&
5// RUN: true
6
7extern "C" int printf(...);
8
9struct S {
10 S() : iS(1), fS(1.23) {};
11 ~S(){printf("S::~S(%d, %f)\n", iS, fS); };
12 int iS;
13 float fS;
14};
15
16struct Q {
17 Q() : iQ(2), dQ(2.34) {};
18 ~Q(){printf("Q::~Q(%d, %f)\n", iQ, dQ); };
19 int iQ;
20 double dQ;
21};
22
23struct P {
24 P() : fP(3.45) , iP(3) {};
25 ~P(){printf("P::~P(%d, %f)\n", iP, fP); };
26 float fP;
27 int iP;
28};
29
30struct M : Q, P {
31 S s;
32
33 Q q;
34
35 P p;
36
37};
38
39M gm;
40
41int main() {M m1;}
42
43// CHECK-LP64: call __ZN1MC1Ev
44// CHECK-LP64: call __ZN1MD1Ev
45// CHECK-LP64: .globl __ZN1MD1Ev
46// CHECK-LP64-NEXT: .weak_definition __ZN1MD1Ev
47// CHECK-LP64-NEXT: __ZN1MD1Ev:
48
49
50// CHECK-LP32: call L__ZN1MC1Ev
51// CHECK-LP32: call L__ZN1MD1Ev
52// CHECK-LP32: .globl __ZN1MD1Ev
53// CHECK-LP32-NEXT: .weak_definition __ZN1MD1Ev
54// CHECK-LP32-NEXT: __ZN1MD1Ev: