[lto] Add a useful test case.
authorSean Silva <chisophugis@gmail.com>
Fri, 11 Mar 2016 01:10:37 +0000 (01:10 +0000)
committerSean Silva <chisophugis@gmail.com>
Fri, 11 Mar 2016 01:10:37 +0000 (01:10 +0000)
This is reduced from an issue found in practice.
The original version of D18012 needed another patch to handle this, but
it now works since we are using a more correct GV->hasAppendingLinkage()
check that Rafael suggested.

This is what remains of that other patch.

llvm-svn: 263181

lld/test/ELF/lto/linkage.ll

index f0f4610..ee1c70c 100644 (file)
@@ -13,3 +13,6 @@ target triple = "x86_64-unknown-linux-gnu"
 define internal void @ctor() {
   ret void
 }
+
+; Should not try to merge a declaration into the combined module.
+declare i32 @llvm.ctpop.i32(i32)