1 // RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s 2 3 // An extra byte should be allocated for an empty class. 4 namespace Test1 { 5 // CHECK: %"struct.Test1::A" = type { i8 } 6 struct A { } *a; 7 } 8 9 namespace Test2 { 10 // No need to add tail padding here. 11 // CHECK: %"struct.Test2::A" = type { i8*, i32 } 12 struct A { void *a; int b; } *a; 13 } 14 15 namespace Test3 { 16 // C should have a vtable pointer. 17 // CHECK: %"struct.Test3::A" = type { i32 (...)**, i32 } 18 struct A { virtual void f(); int a; } *a; 19 } 20