Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s |
Anders Carlsson | 696798f | 2009-07-27 17:10:54 +0000 | [diff] [blame] | 2 | |
| 3 | // An extra byte shoudl be allocated for an empty class. |
Anders Carlsson | c245682 | 2009-12-08 01:24:23 +0000 | [diff] [blame] | 4 | // CHECK: %struct.A = type { i8 } |
Anders Carlsson | 696798f | 2009-07-27 17:10:54 +0000 | [diff] [blame] | 5 | struct A { } a; |
Anders Carlsson | c245682 | 2009-12-08 01:24:23 +0000 | [diff] [blame] | 6 | |
| 7 | // No need to add tail padding here. |
| 8 | // CHECK: %struct.B = type { i8*, i32 } |
| 9 | struct B { void *a; int b; } b; |
Anders Carlsson | 4b3e5be | 2009-12-16 17:27:20 +0000 | [diff] [blame^] | 10 | |
| 11 | // C should have a vtable pointer. |
| 12 | // CHECK: %struct.C = type { i8**, i32 } |
| 13 | struct C { virtual void f(); int a; } *c; |