Dale Johannesen | b7629aa | 2009-06-22 04:47:32 +0000 | [diff] [blame^] | 1 | // 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} |
| 6 | // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.CC} | grep {struct.bar} |
| 7 | // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.bar} | grep {1 x i32} |
| 8 | // RUN: %llvmgxx -S -m32 -emit-llvm %s -o - | grep {struct.SRCFilter::FilterEntry} | not grep {1 x i32} |
| 9 | // XFAIL: * |
| 10 | // XTARGET: powerpc-apple-darwin |
| 11 | |
| 12 | template<class _T1, class _T2> struct payre { |
| 13 | _T1 first; |
| 14 | _T2 second; |
| 15 | payre() : first(), second() { } |
| 16 | }; |
| 17 | struct KBFP { |
| 18 | double mCutoffFrequency; |
| 19 | }; |
| 20 | class SRCFilter { |
| 21 | struct FilterEntry: public payre<KBFP, float*>{}; |
| 22 | static FilterEntry foo; |
| 23 | }; |
| 24 | SRCFilter::FilterEntry SRCFilter::foo; // 12 bytes |
| 25 | payre<KBFP, float*> baz; // 16 bytes |
| 26 | class CC { // 16 bytes |
| 27 | public: payre<KBFP, float*> x; |
| 28 | }; |
| 29 | class CC ccc; |
| 30 | |
| 31 | struct bar { KBFP x; float* y;}; // 16 bytes |
| 32 | struct bar quux; |