[PATCH] D81429: [COFF] Port CallGraphSort to COFF from ELF
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 18:09:04 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/COFF/Driver.cpp:945
+ }
+
+ if (DefinedCOFF *dr = dyn_cast_or_null<DefinedCOFF>(sym))
----------------
zequanwu wrote:
> hans wrote:
> > ELF calls maybeWarnUnorderableSymbol() here, but I suppose there's no corresponding concept for COFF?
> I don't find corresponding concept.
`maybeWarnUnorderableSymbol` is not useful. You can omit it for COFF. The list is usually generated by the compilers - in very few circumstances a user specifies it. There is not much point diagnosing unneeded symbols in the linker.
================
Comment at: lld/ELF/CallGraphSort.cpp:71
int prev;
- size_t size = 0;
+ size_t size;
uint64_t weight = 0;
----------------
uint64_t may be better.
size_t is 32-bit on a 32-bit platform, while you want a 64-bit value here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81429/new/
https://reviews.llvm.org/D81429
More information about the llvm-commits
mailing list