[PATCH] D55237: LTO: Don't internalize available_externally globals.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 3 15:44:48 PST 2018


pcc added inline comments.


================
Comment at: llvm/lib/LTO/LTO.cpp:363
+               !GlobalValue::isAppendingLinkage(S->linkage()) &&
+               S->linkage() != GlobalValue::AvailableExternallyLinkage)
       S->setLinkage(GlobalValue::InternalLinkage);
----------------
pirama wrote:
> Use `!GLobalValue::isAvailableExternallyLinkage(S->linkage())` instead?
> 
> Also, we should update the earlier comment.
I'd prefer not to since it boils down to a comparison and it's slightly clearer to be explicit. Added comment and changed the other condition to be explicit as well.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55237/new/

https://reviews.llvm.org/D55237





More information about the llvm-commits mailing list