[lib/LTO] Add a comment to explain where we set the linkage in the summary.

Pointed out by Teresa!

llvm-svn: 307305
This commit is contained in:
Davide Italiano 2017-07-06 20:04:20 +00:00
parent a72a9ff557
commit f4891d29f8
1 changed files with 5 additions and 0 deletions

View File

@ -547,6 +547,11 @@ void llvm::thinLTOResolveWeakForLinkerModule(
// Switch the linkage to weakany if asked for, e.g. we do this for
// linker redefined symbols (via --wrap or --defsym).
// We record that the visibility should be changed here in `addThinLTO`
// as we need access to the resolution vectors for each input file in
// order to find which symbols have been redefined.
// We may consider reorganizing this code and moving the linkage recording
// somewhere else, e.g. in thinLTOResolveWeakForLinkerInIndex.
if (NewLinkage == GlobalValue::WeakAnyLinkage) {
GV.setLinkage(NewLinkage);
return;