diff options
-rw-r--r-- | lld/ELF/InputFiles.cpp | 2 | ||||
-rw-r--r-- | lld/test/ELF/lto/linkage.ll | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index a4757b1b405..e235cbc5dca 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -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; diff --git a/lld/test/ELF/lto/linkage.ll b/lld/test/ELF/lto/linkage.ll index ee1c70c8b99..5af9b321eee 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 |