aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/global-sections.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-27 07:41:44 +0000
committerChris Lattner <sabre@nondot.org>2010-04-27 07:41:44 +0000
commit4c4d0c0cc582a61d9e7f58594c71540aaa56b280 (patch)
treeabcf41eb3d85f6beee70b48146fd7ca8b3b2ee29 /test/CodeGen/X86/global-sections.ll
parent77640feed77b2e3a5edacd5b36305d5400fc4705 (diff)
downloadexternal_llvm-4c4d0c0cc582a61d9e7f58594c71540aaa56b280.zip
external_llvm-4c4d0c0cc582a61d9e7f58594c71540aaa56b280.tar.gz
external_llvm-4c4d0c0cc582a61d9e7f58594c71540aaa56b280.tar.bz2
round zero-byte .zerofill directives up to 1 byte. This
should fix some "g++.dg-struct-layout-1" failures, rdar://7886017 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/global-sections.ll')
-rw-r--r--test/CodeGen/X86/global-sections.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/global-sections.ll b/test/CodeGen/X86/global-sections.ll
index 732d764..6d21191 100644
--- a/test/CodeGen/X86/global-sections.ll
+++ b/test/CodeGen/X86/global-sections.ll
@@ -144,3 +144,17 @@
; LINUX: G10:
; LINUX: .zero 400
+
+
+;; Zero sized objects should round up to 1 byte in zerofill directives.
+; rdar://7886017
+@G11 = global [0 x i32] zeroinitializer
+@G12 = global {} zeroinitializer
+@G13 = global { [0 x {}] } zeroinitializer
+
+; DARWIN: .globl _G11
+; DARWIN: .zerofill __DATA,__common,_G11,1,2
+; DARWIN: .globl _G12
+; DARWIN: .zerofill __DATA,__common,_G12,1,3
+; DARWIN: .globl _G13
+; DARWIN: .zerofill __DATA,__common,_G13,1,3