[PATCH] D15156: [ThinLTO] Appending linkage fixes

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 14:30:26 PST 2015


joker.eph added inline comments.

================
Comment at: lib/Linker/LinkModules.cpp:1867
@@ -1865,1 +1866,3 @@
+       GV.hasAvailableExternallyLinkage() ||
+       (GV.hasAppendingLinkage() && isPerformingImport()))) {
     return false;
----------------
Found another crash:

ModuleLinker::run() will start by iterating over all the variables in the module and call linkIfNeeded(GV). Your fix here only kicks in if there is no "DGV" (why?).

If the destination module already have a global_ctors, DGV won't be null. We may want to fix getLinkedToGlobal() as well.

All of this logic gets more and more complicate, this is a bit scary.


http://reviews.llvm.org/D15156





More information about the llvm-commits mailing list