[lto] The previous testcase was not useful enough.
authorSean Silva <chisophugis@gmail.com>
Fri, 11 Mar 2016 05:42:34 +0000 (05:42 +0000)
committerSean Silva <chisophugis@gmail.com>
Fri, 11 Mar 2016 05:42:34 +0000 (05:42 +0000)
-shared was hiding the fact that the intrinsic wasn't being found.

llvm-svn: 263197

lld/ELF/InputFiles.cpp
lld/test/ELF/lto/linkage.ll

index a4757b1b4056e6626f88f43d90cdba2e194295a0..e235cbc5dcab4c53cb0899617adcb621c3840dbe 100644 (file)
@@ -454,6 +454,8 @@ void BitcodeFile::parse(DenseSet<StringRef> &ComdatGroups) {
       ExtraKeeps.push_back(GV->getName().copy(Alloc));
       continue;
     }
+    if (Flags & BasicSymbolRef::SF_FormatSpecific)
+        continue;
     uint8_t Visibility = getGvVisibility(GV);
 
     SmallString<64> Name;
index ee1c70c8b99f503ff1475fd67e2c1304ef6f27ea..5af9b321eeec4294a392dc631e4189cdb16e7512 100644 (file)
@@ -1,6 +1,7 @@
 ; REQUIRES: x86
 ; RUN: llvm-as %s -o %t1.o
 ; RUN: ld.lld -m elf_x86_64 %t1.o %t1.o -o %t.so -shared
+; RUN: llvm-nm %t.so | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
@@ -16,3 +17,4 @@ define internal void @ctor() {
 
 ; Should not try to merge a declaration into the combined module.
 declare i32 @llvm.ctpop.i32(i32)
+; CHECK-NOT: llvm.ctpop.i32