[PATCH] D34803: [LTO] Remove values from non-prevailing comdats

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 20:14:51 PDT 2017


tejohnson created this revision.
Herald added subscribers: inglorion, mehdi_amini.

When linking a regular LTO module, if it has any non-prevailing values
(dropped to available_externally) in comdats, we need to do more than
just remove those values from their comdat. We also remove all values
from that comdat, so as to avoid leaving an incomplete comdat.

This is necessary in case we are compiling in mixed regular and ThinLTO
mode, since the resulting regularLTO native object is always linked into
the final binary first. We need to prevent the linker from selecting an
incomplete comdat that was not the prevailing copy.

Fixes PR32980.


https://reviews.llvm.org/D34803

Files:
  lib/LTO/LTO.cpp
  test/LTO/Resolution/X86/Inputs/comdat-mixed-lto.ll
  test/LTO/Resolution/X86/comdat-mixed-lto.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34803.104585.patch
Type: text/x-patch
Size: 5623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/0aceb141/attachment.bin>


More information about the llvm-commits mailing list