If the linker decided that LTO is supposed to provide the
"Prevailing" definition for a symbol, and ask the symbol
to be "preserved", then we should honor it and make sure
the symbol is emitted.
Here we import useless definition in some cases, but we
can rely on GlobalDCE to delete them after (unless the
linker requested us to preserve them).
A bunch of tests are failing:
Failing Tests (5):
LLVM :: Linker/comdat12.ll LLVM :: Linker/internalize-lazy.ll LLVM :: Linker/only-needed-named-metadata.ll LLVM :: Linker/pr21494.ll LLVM :: tools/lto/hide-linkonce-odr.ll
So I'm not sure at this point this is the right fix, but I'm
eager to get feedback on how to solve this.