| 1 |
// 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 |
| 5 |
|
| 6 |
extern "C" int printf(...); |
| 7 |
|
| 8 |
static int count; |
| 9 |
static float fcount; |
| 10 |
|
| 11 |
class xpto { |
| 12 |
public: |
| 13 |
xpto() : i(count++), f(fcount++) { |
| 14 |
printf("xpto::xpto()\n"); |
| 15 |
} |
| 16 |
int i; |
| 17 |
float f; |
| 18 |
|
| 19 |
~xpto() { |
| 20 |
printf("xpto::~xpto()\n"); |
| 21 |
} |
| 22 |
}; |
| 23 |
|
| 24 |
int 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 |
|
| 33 |
// CHECK: call void @_ZN4xptoC1Ev |