blob: 53b81f2d85ba6fbf8d26764b13ec042aebea1509 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
2// RUN: FileCheck %s
3// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
4// RUN: FileCheck %s
Fariborz Jahanianae013b92009-10-28 20:55:41 +00005
6extern "C" int printf(...);
7
8static int count;
9static float fcount;
10
11class xpto {
12public:
13 xpto() : i(count++), f(fcount++) {
14 printf("xpto::xpto()\n");
15 }
16 int i;
17 float f;
18
Fariborz Jahanianae013b92009-10-28 20:55:41 +000019 ~xpto() {
20 printf("xpto::~xpto()\n");
21 }
Fariborz Jahanianae013b92009-10-28 20:55:41 +000022};
23
24int main() {
25 xpto array[2][3][4];
26 for (int h = 0; h < 2; h++)
27 for (int i = 0; i < 3; i++)
28 for (int j = 0; j < 4; j++)
29 printf("array[%d][%d][%d] = {%d, %f}\n",
30 h, i, j, array[h][i][j].i, array[h][i][j].f);
31}
32
Stephen Hines651f13c2014-04-23 16:59:28 -070033// CHECK: call void @_ZN4xptoC1Ev