class-layout.cpp revision c2456824a106455bae5d738fe65d80b14a6804c4
1// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
2
3// An extra byte shoudl be allocated for an empty class.
4// CHECK: %struct.A = type { i8 }
5struct A { } a;
6
7// No need to add tail padding here.
8// CHECK: %struct.B = type { i8*, i32 }
9struct B { void *a; int b; } b;
10