blob: 31091c5f45431dec97c3d8a52c03ca363e266682 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
Anders Carlsson696798f2009-07-27 17:10:54 +00002
3// An extra byte shoudl be allocated for an empty class.
Anders Carlssonc2456822009-12-08 01:24:23 +00004// CHECK: %struct.A = type { i8 }
Anders Carlsson696798f2009-07-27 17:10:54 +00005struct A { } a;
Anders Carlssonc2456822009-12-08 01:24:23 +00006
7// No need to add tail padding here.
8// CHECK: %struct.B = type { i8*, i32 }
9struct B { void *a; int b; } b;
Anders Carlsson4b3e5be2009-12-16 17:27:20 +000010
11// C should have a vtable pointer.
12// CHECK: %struct.C = type { i8**, i32 }
13struct C { virtual void f(); int a; } *c;