[PATCH] D29367: LTO: Link non-prevailing weak_odr, linkonce_odr or available_externally globals into the combined module with available_externally linkage.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 20:51:01 PST 2017
pcc added inline comments.
================
Comment at: llvm/lib/LTO/LTO.cpp:478
+ if (CombinedGV && CombinedGV->hasAvailableExternallyLinkage()) {
+ // Remove the body of any available_externally copy of the symbol that
+ // we may have linked below. We can only ever get here with a
----------------
tejohnson wrote:
> Will the IRLinker not replace the existing available_externally definition with the prevailing copy since it is added above to Keep (ValuesToLink)?
Yes it will, removed this code.
================
Comment at: llvm/lib/LTO/LTO.cpp:484
+ CombinedGO->setLinkage(GlobalValue::ExternalLinkage);
+ CombinedGO->setComdat(nullptr);
+ CombinedGO->clearMetadata();
----------------
tejohnson wrote:
> CombinedGO should never have a Comdat at this point, since it was available_externally.
Now moot
https://reviews.llvm.org/D29367
More information about the llvm-commits
mailing list