[PATCH] D18674: [ThinLTO/gold] Change preempted def to avail extern linkage when possible

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 13:46:00 PDT 2016


tejohnson added inline comments.

================
Comment at: tools/gold/gold-plugin.cpp:779
@@ +778,3 @@
+      // FIXME: For can preempted Comdat members be dropped from their
+      // Comdat so they can use available_externally linkage?
+      if (options::thinlto && !GV->hasComdat() &&
----------------
rafael wrote:
> It is OK to have available_externally to a comdat member, no?
> 
> I mean, it is equivalent to a declaration, and we can have a declaration to a comdat member.
You can't have a declaration or available_externally in a comdat. From Verifier.cpp:

  if (GV.isDeclarationForLinker())
    Assert(!GV.hasComdat(), "Declaration may not be in a Comdat!", &GV);




http://reviews.llvm.org/D18674





More information about the llvm-commits mailing list