OSDN Git Service

Fix logic for which symbols to keep with comdats.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 23 Mar 2016 21:16:33 +0000 (21:16 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 23 Mar 2016 21:16:33 +0000 (21:16 +0000)
commitd7bb2de6712dc5cf32f6a6c5a9c2bfeaa4224a45
treeb16a7d2880a88d5bed44c83f8526a4abb0da56df
parent46e35edc2d1101e461bf2ca14e5a80c71934f7de
Fix logic for which symbols to keep with comdats.

If a comdat is dropped, all symbols in it are dropped.
If a comdat is kept, the symbols survive to pass regular symbol
resolution.
With this patch we do that for all global symbols.

The added test is a copy of test/tools/gold/X86/comdat.ll that we now
pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264192 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp
test/Linker/Inputs/comdat16.ll [new file with mode: 0644]
test/Linker/comdat16.ll [new file with mode: 0644]
test/Linker/constructor-comdat.ll