[PATCH] D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 13:03:37 PDT 2017


mstorsjo added inline comments.


================
Comment at: lib/Object/COFFImportFile.cpp:593
 
-    StringRef SymbolName = E.isWeak() ? E.ExtName : E.Name;
     ImportNameType NameType = getNameType(SymbolName, E.Name, Machine);
----------------
rnk wrote:
> Do we not need to look at ExtName for weak symbols?
If `E.isWeak()`, we created a weak external above and never even get here (extend the diff by some lines above to see more context). So `E.isWeak()` could never be true here before.

This brings it back to more or less exact the same logic that was used before this was split out of LLD.


https://reviews.llvm.org/D36544





More information about the llvm-commits mailing list