[PATCH] D40238: COFF: Do not create SectionChunks for discarded comdat sections.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 09:46:46 PST 2017
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lld/COFF/InputFiles.cpp:251-252
+ WeakAliases.emplace_back(Symbols[I], TagIndex);
} else {
- Sym = createDefined(COFFSym, AuxP, IsFirst);
+ if (Optional<Symbol *> OptSym = createDefined(COFFSym, ComdatDefs))
+ Symbols[I] = *OptSym;
----------------
else if
================
Comment at: lld/COFF/InputFiles.cpp:333
+ // Handle comdat leader symbols.
+ if (auto *Def = ComdatDefs[SectionNumber]) {
+ ComdatDefs[SectionNumber] = nullptr;
----------------
auto -> const coff_aux_section_definition *
================
Comment at: lld/COFF/SymbolTable.cpp:241
+ return {S, true};
+ } else if (!cast<DefinedRegular>(S)->isCOMDAT()) {
+ reportDuplicate(S, F);
----------------
Remove `else` after `return`.
https://reviews.llvm.org/D40238
More information about the llvm-commits
mailing list