[compatibility.ll] Cover explicitly named comdats.
authorSean Silva <chisophugis@gmail.com>
Thu, 6 Aug 2015 22:04:21 +0000 (22:04 +0000)
committerSean Silva <chisophugis@gmail.com>
Thu, 6 Aug 2015 22:04:21 +0000 (22:04 +0000)
Patch by Vedant Kumar! <vsk@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244284 91177308-0d34-0410-b5e6-96231b3b80d8

test/Bitcode/compatibility-3.6.ll
test/Bitcode/compatibility-3.6.ll.bc

index be4419cf8f656343e4cbb6f902ef6399fa29f090..f7baa60a8a403fedf58183a5ab2dc8ca9c62f4e5 100644 (file)
@@ -40,6 +40,14 @@ $comdat.samesize = comdat samesize
 @comdat.samesize = global i32 0, comdat
 ; CHECK: @comdat.samesize = global i32 0, comdat
 
+; Force two globals from different comdats into sections with the same name.
+$comdat1 = comdat any
+$comdat2 = comdat any
+@g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1)
+; CHECK: @g.comdat1 = global i32 0, section "SharedSection", comdat($comdat1)
+@g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2)
+; CHECK: @g.comdat2 = global i32 0, section "SharedSection", comdat($comdat2)
+
 ;; Constants
 @const.true = constant i1 true
 ; CHECK: @const.true = constant i1 true
index 2afb9d5ee877a8b93dbc961bf448b69f45e51a9a..d75cbca7fb1b147e7471e504c80cec600458106f 100644 (file)
Binary files a/test/Bitcode/compatibility-3.6.ll.bc and b/test/Bitcode/compatibility-3.6.ll.bc differ