[PATCH] D17975: [lto] Avoid duplicate symbol error for appending linkage.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 19:47:26 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL262992: [lto] Avoid duplicate symbol error for appending linkage. (authored by silvas).

Changed prior to commit:
  http://reviews.llvm.org/D17975?vs=50099&id=50100#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17975

Files:
  lld/trunk/ELF/InputFiles.cpp
  lld/trunk/test/ELF/lto/linkage.ll

Index: lld/trunk/ELF/InputFiles.cpp
===================================================================
--- lld/trunk/ELF/InputFiles.cpp
+++ lld/trunk/ELF/InputFiles.cpp
@@ -446,6 +446,8 @@
         continue;
     if (!(Flags & BasicSymbolRef::SF_Global))
         continue;
+    if (Flags & BasicSymbolRef::SF_FormatSpecific)
+      continue;
     uint8_t Visibility = getGvVisibility(GV);
 
     SmallString<64> Name;
Index: lld/trunk/test/ELF/lto/linkage.ll
===================================================================
--- lld/trunk/test/ELF/lto/linkage.ll
+++ lld/trunk/test/ELF/lto/linkage.ll
@@ -7,3 +7,9 @@
 
 ; Should not encounter a duplicate symbol error for @.str
 @.str = private unnamed_addr constant [4 x i8] c"Hey\00", align 1
+
+; Should not encounter a duplicate symbol error for @llvm.global_ctors
+ at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor, i8* null }]
+define internal void @ctor() {
+  ret void
+}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17975.50100.patch
Type: text/x-patch
Size: 1003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160309/09562028/attachment.bin>


More information about the llvm-commits mailing list