[PATCH] D36351: [lld][ELF] Add profile guided section layout
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 6 15:29:54 PST 2018
Michael Spencer via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:
> +struct Section {
> + Section(const InputSectionBase *IS) : ISB(IS) { Size = ISB->getSize(); }
> +
> + Double getDensity() const {
> + if (Size == 0)
> + return 0;
> + return Double(Weight) / Double(Size);
> + }
> +
> + int64_t Size = 0;
Why is Size signed? With the previous errors fixed I get a warning:
CallGraphSort.cpp:302:30: warning: comparison of integers of different
signs: 'long' and 'const uint64_t' (aka 'const unsigned long')
Cheers,
Rafael
More information about the llvm-commits
mailing list