blob: d533600b54dbd5cf4146b59ebe5c1ed49376abdf [file] [log] [blame]
Anders Carlsson237957c2009-08-09 18:26:27 +00001// RUN: clang-cc -emit-llvm %s -o %t -triple=x86_64-apple-darwin9 &&
2
3struct A {
4 int i;
5};
6
7// RUN: grep "@a = global i64 -1" %t &&
8int A::* a;
9
Anders Carlssond1a9bac2009-08-23 00:02:11 +000010// RUN: grep "@aa = global \[2 x i64\] \[i64 -1, i64 -1\]" %t &&
Anders Carlsson237957c2009-08-09 18:26:27 +000011int A::* aa[2];
12
13// RUN: grep "@aaa = global \[2 x \[2 x i64\]\] \[\[2 x i64\] \[i64 -1, i64 -1\], \[2 x i64\] \[i64 -1, i64 -1\]\]" %t &&
14int A::* aaa[2][2];
15
Anders Carlssond1a9bac2009-08-23 00:02:11 +000016// RUN: grep "@b = global i64 -1" %t &&
17int A::* b = 0;
18
Anders Carlsson237957c2009-08-09 18:26:27 +000019void f() {
Daniel Dunbar55a759b2009-08-23 19:28:59 +000020 // RUN: grep "%.* = icmp ne i64 %.*, -1" %t
Anders Carlsson237957c2009-08-09 18:26:27 +000021 if (a) { }
22
23 // FIXME: This doesn't yet work
24// if (a != 0) { }
25
26}
27