diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-08 01:24:23 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-08 01:24:23 +0000 |
commit | 220bf4fc5a94a01a6e429def403da1bbe537bb2a (patch) | |
tree | 91b556f6babf26bd10781804ae2ba3d59e4e666f /clang/test/CodeGenCXX/class-layout.cpp | |
parent | dd2b2f8cba19a64cc9411b1e34e153763405bcdd (diff) | |
download | bcm5719-llvm-220bf4fc5a94a01a6e429def403da1bbe537bb2a.tar.gz bcm5719-llvm-220bf4fc5a94a01a6e429def403da1bbe537bb2a.zip |
No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.
llvm-svn: 90820
Diffstat (limited to 'clang/test/CodeGenCXX/class-layout.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/class-layout.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/class-layout.cpp b/clang/test/CodeGenCXX/class-layout.cpp index 7663d2e541b..d4fc627082d 100644 --- a/clang/test/CodeGenCXX/class-layout.cpp +++ b/clang/test/CodeGenCXX/class-layout.cpp @@ -1,5 +1,9 @@ -// RUN: clang-cc %s -emit-llvm -o %t +// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s // An extra byte shoudl be allocated for an empty class. -// RUN: grep '%.truct.A = type { i8 }' %t +// 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; |