[PATCH] D35064: [lib/LTO] Fix the interaction between linker redefined symbols and ThinLTO

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 6 09:49:46 PDT 2017


tejohnson added inline comments.


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:544
+    if (GV.getLinkage() == GlobalValue::AppendingLinkage ||
+        GV.getLinkage() == GlobalValue::ExternalLinkage)
       return;
----------------
The comment doesn't seem to match the check. And don't we want to be able to convert renamed externally visible symbols to WeakAny (like in the attached test case)?


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:560
         GlobalValue::isInterposableLinkage(GV.getLinkage()))
       ConvertToDeclaration(GV);
     else {
----------------
Will this do the wrong thing (i.e. would we potentially convert something to a declaration when we wanted to convert it to WeakAny (the routine was previously only used to convert to available_externally).


https://reviews.llvm.org/D35064





More information about the llvm-commits mailing list