brintos

brintos / llvm-project-archived public Read only

0
0
Text · 711 B · 53b81f2 Raw
34 lines · cpp
1// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \2// RUN: FileCheck %s3// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \4// RUN: FileCheck %s5 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 19  ~xpto() {20    printf("xpto::~xpto()\n");21  }22};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 33// CHECK: call void @_ZN4xptoC1Ev34