Jan 25 2021
Addressed review comments.
Jan 24 2021
Jan 23 2021
Jan 22 2021
Given the langref text I'm unsure what it means to link an append linkage variable to a non-append linkage one. I can see how extern is different but what would happen before & now if you remove the extern.
Jan 21 2021
Jan 19 2021
Jan 14 2021
Do you have any measurements showing actual impact on performance or memory consumption?
Addressed review comment.
Jan 13 2021
Jan 5 2021
Jan 4 2021
Dec 28 2020
Dec 22 2020
Well, it looks like nobody is going to respond.
Dec 18 2020
Dec 14 2020
Dec 10 2020
Updated diff after committing NFC changes (D92918).
Dec 9 2020
I wonder if we want to go even further and bring archive linking closer to how static linking works with normal object files?
Instead of linking all files in the archive together (that may have its own set of issues) and returning a single module, perhaps we should just load individual files, return them as a vector and link each of them in order with --only-needed.
Well, when you use a class you have to know the interface it defines, so this is not about the implementation details, but about the interface provided by the class. llvm::Linker::linkModules(), as it is defined today, is a static member of the class, so it does not require an instance of llvm::Linker class to be called. Adding an additional parameter to loadArFile just in case does not buy as anything at all except unneeded redundancy. And, by the way, this function is called as a static member (i.e. Linker::linkModules()) everywhere in LLVM sources except llvm-link.cpp:
Dec 8 2020
The patch description describes what the patch does, but does not tell us much about the problem is is supposed to fix.
Could you give us more details on why the patch is needed?
Dec 7 2020
Do you have any comments for this patch?
Dec 3 2020
I have realized that this patch is not NFC, and it corrects llvm-link behavior when archive is linked with other inputs as a library (with --only-needed option). I have updated description and added LIT test to the patch.
Dec 2 2020
Added BinaryFormat to the list of components that need to be linked.
Dec 1 2020
Nov 24 2020
Nov 12 2020
Jul 27 2020
Added unit test for the CallGraphNode::replaceCallEdge() change. Without this change test finishes with an assertion on windows debug build.
Jul 22 2020
Yes, exactly. If the number of callbacks is the same we can avoid invalidating iterators. I assume that should really cover most of the cases.
Jul 13 2020
Jul 1 2020
Jun 28 2020
Rebase after committing NFC patch (D82686).
Jun 26 2020
Sure, I have separated NFC changes to D82686.
Jun 25 2020
One more fix for pre-merge check issues.
Fixed 'clang-format' issue reported by pre-merge checks.