summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/class-layout.cpp
blob: d4fc627082d253612a4365400725fa18a99887a3 (plain)
1
2
3
4
5
6
7
8
9
// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s

// An extra byte shoudl be allocated for an empty class.
// CHECK: %struct.A = type { i8 }
struct A { } a;

// No need to add tail padding here.
// CHECK: %struct.B = type { i8*, i32 }
struct B { void *a; int b; } b;
OpenPOWER on IntegriCloud