[PATCH] D61255: [ThinLTO] Make weak data symbols prevailing when they're visible to regular object

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 21:42:46 PDT 2019


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

Fix LGTM. A couple of requests for comments below. Also, please update title of patch, and add a description to the patch summary.



================
Comment at: lib/LTO/LTO.cpp:383
+               S->linkage() != GlobalValue::AvailableExternallyLinkage &&
+               !isWeakWriteableObject(S.get()))
       S->setLinkage(GlobalValue::InternalLinkage);
----------------
add comment


================
Comment at: test/ThinLTO/X86/weak_externals.ll:9
+
+; CHECK: @_ZZN9SingletonI1SE11getInstanceEvE8instance = available_externally dso_local global %struct.S zeroinitializer
+; CHECK: @_ZZN9SingletonI1SE11getInstanceEvE13instance_weak = available_externally dso_local global %struct.S* null, align 8
----------------
Add comment about what this test is checking for.


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

https://reviews.llvm.org/D61255





More information about the llvm-commits mailing list