aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/class-layout.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-08 01:24:23 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-08 01:24:23 +0000
commitc2456824a106455bae5d738fe65d80b14a6804c4 (patch)
tree9419fa1ff060b354f41482616da6382ca6e3b951 /test/CodeGenCXX/class-layout.cpp
parentb455f0e74be0144ab9738ef574d07bd661959525 (diff)
No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/class-layout.cpp')
-rw-r--r--test/CodeGenCXX/class-layout.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp
index 7663d2e541..d4fc627082 100644
--- a/test/CodeGenCXX/class-layout.cpp
+++ b/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;