From 4a0ff22d5108ef9233a1f05bdd6bf8601ce3ffc0 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Fri, 11 Mar 2016 05:42:34 +0000 Subject: [PATCH] [lto] The previous testcase was not useful enough. -shared was hiding the fact that the intrinsic wasn't being found. llvm-svn: 263197 --- lld/ELF/InputFiles.cpp | 2 ++ lld/test/ELF/lto/linkage.ll | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index a4757b1b4056..e235cbc5dcab 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -454,6 +454,8 @@ void BitcodeFile::parse(DenseSet &ComdatGroups) { ExtraKeeps.push_back(GV->getName().copy(Alloc)); continue; } + if (Flags & BasicSymbolRef::SF_FormatSpecific) + continue; uint8_t Visibility = getGvVisibility(GV); SmallString<64> Name; diff --git a/lld/test/ELF/lto/linkage.ll b/lld/test/ELF/lto/linkage.ll index ee1c70c8b99f..5af9b321eeec 100644 --- a/lld/test/ELF/lto/linkage.ll +++ b/lld/test/ELF/lto/linkage.ll @@ -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