summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/pragma-pack.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-04-17 21:56:13 +0000
committerAnders Carlsson <andersca@mac.com>2011-04-17 21:56:13 +0000
commitfcaaa697ec3e6ab3cb38ad614102b16fcfb28a32 (patch)
treea68369232a9233c45353940bf1e41a4c72e18ba2 /clang/test/CodeGenCXX/pragma-pack.cpp
parent2caf2074fd29add31565d619b6296e08577f9fdd (diff)
downloadbcm5719-llvm-fcaaa697ec3e6ab3cb38ad614102b16fcfb28a32.tar.gz
bcm5719-llvm-fcaaa697ec3e6ab3cb38ad614102b16fcfb28a32.zip
When laying out bases in, always try the "base subobject" LLVM type. If it
turns out that a field or base needs to be laid out in the tail padding of the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert it to an array of i8. I've audited the new test results to make sure that they are still valid. I've also verified that we pass a self-host with this change. This (finally) fixes PR5589! llvm-svn: 129673
Diffstat (limited to 'clang/test/CodeGenCXX/pragma-pack.cpp')
-rw-r--r--clang/test/CodeGenCXX/pragma-pack.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/pragma-pack.cpp b/clang/test/CodeGenCXX/pragma-pack.cpp
index c0ddb1d855a..c0b02597846 100644
--- a/clang/test/CodeGenCXX/pragma-pack.cpp
+++ b/clang/test/CodeGenCXX/pragma-pack.cpp
@@ -10,5 +10,7 @@ struct Sub : virtual Base {
char c;
};
-// CHECK: %struct.Sub = type <{ i32 (...)**, i8, [8 x i8] }>
+// CHECK: %struct.Sub = type <{ i32 (...)**, i8, %struct.Base }>
void f(Sub*) { }
+
+static int i[sizeof(Sub) == 13 ? 1 : -1];
OpenPOWER on IntegriCloud