blob: dcb2f16a5dc8fe95f2450a5c257ab7e673bcf00c [file] [log] [blame]
Dale Johannesenb7629aa2009-06-22 04:47:32 +00001// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep baz | grep global | grep {struct.bar}
2// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep ccc | grep global | grep {struct.CC}
3// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep quux | grep global | grep {struct.bar}
4// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep foo | grep global | grep {struct.SRCFilter::FilterEntry}
5// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.bar} | grep {1 x i32}
Dale Johannesenb53d938b2009-09-09 23:37:46 +00006// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.CC} | grep {struct.payre<KBFP,float*} | grep {.base.32} | grep {1 x i32}
Dale Johannesenb7629aa2009-06-22 04:47:32 +00007// RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.SRCFilter::FilterEntry} | not grep {1 x i32}
8// XFAIL: *
9// XTARGET: powerpc-apple-darwin
10
11template<class _T1, class _T2> struct payre {
12 _T1 first;
13 _T2 second;
14 payre() : first(), second() { }
15};
16struct KBFP {
17 double mCutoffFrequency;
18};
19class SRCFilter {
20 struct FilterEntry: public payre<KBFP, float*>{};
21 static FilterEntry foo;
22};
23SRCFilter::FilterEntry SRCFilter::foo; // 12 bytes
24payre<KBFP, float*> baz; // 16 bytes
25class CC { // 16 bytes
26 public: payre<KBFP, float*> x;
27};
28class CC ccc;
29
30struct bar { KBFP x; float* y;}; // 16 bytes
31struct bar quux;
Dale Johannesenb53d938b2009-09-09 23:37:46 +000032