[lto] The previous testcase was not useful enough.

-shared was hiding the fact that the intrinsic wasn't being found.

llvm-svn: 263197
This commit is contained in:
Sean Silva 2016-03-11 05:42:34 +00:00
parent 4ba6cf69e4
commit 4a0ff22d51
2 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,8 @@ void BitcodeFile::parse(DenseSet<StringRef> &ComdatGroups) {
ExtraKeeps.push_back(GV->getName().copy(Alloc)); ExtraKeeps.push_back(GV->getName().copy(Alloc));
continue; continue;
} }
if (Flags & BasicSymbolRef::SF_FormatSpecific)
continue;
uint8_t Visibility = getGvVisibility(GV); uint8_t Visibility = getGvVisibility(GV);
SmallString<64> Name; SmallString<64> Name;

View File

@ -1,6 +1,7 @@
; REQUIRES: x86 ; REQUIRES: x86
; RUN: llvm-as %s -o %t1.o ; RUN: llvm-as %s -o %t1.o
; RUN: ld.lld -m elf_x86_64 %t1.o %t1.o -o %t.so -shared ; 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 datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu" 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. ; Should not try to merge a declaration into the combined module.
declare i32 @llvm.ctpop.i32(i32) declare i32 @llvm.ctpop.i32(i32)
; CHECK-NOT: llvm.ctpop.i32