summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/global-init.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/global-init.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/global-init.cpp')
-rw-r--r--clang/test/CodeGenCXX/global-init.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/global-init.cpp b/clang/test/CodeGenCXX/global-init.cpp
index f9eeb59145f..9bd7390d076 100644
--- a/clang/test/CodeGenCXX/global-init.cpp
+++ b/clang/test/CodeGenCXX/global-init.cpp
@@ -20,8 +20,8 @@ struct D { ~D(); };
// PR6205: The casts should not require global initializers
// CHECK: @_ZN6PR59741cE = external global %"struct.PR5974::C"
-// CHECK: @_ZN6PR59741aE = global %"struct.PR5974::A"* bitcast (%"struct.PR5974::C"* @_ZN6PR59741cE to %"struct.PR5974::A"*), align 8
-// CHECK: @_ZN6PR59741bE = global %"struct.PR5974::A"* bitcast (i8* getelementptr (%"struct.PR5974::C"* @_ZN6PR59741cE, i32 0, i32 0, i64 4) to %"struct.PR5974::A"*), align 8
+// CHECK: @_ZN6PR59741aE = global %"struct.PR5974::A"* getelementptr inbounds (%"struct.PR5974::C"* @_ZN6PR59741cE, i32 0, i32 0)
+// CHECK: @_ZN6PR59741bE = global %"struct.PR5974::A"* bitcast (i8* getelementptr (i8* bitcast (%"struct.PR5974::C"* @_ZN6PR59741cE to i8*), i64 4) to %"struct.PR5974::A"*), align 8
// CHECK: call void @_ZN1AC1Ev(%struct.A* @a)
// CHECK: call i32 @__cxa_atexit(void (i8*)* bitcast (void (%struct.A*)* @_ZN1AD1Ev to void (i8*)*), i8* getelementptr inbounds (%struct.A* @a, i32 0, i32 0), i8* bitcast (i8** @__dso_handle to i8*))
OpenPOWER on IntegriCloud