[PATCH] D63344: lld/elf: Deduplicate undefined symbol diagnostics
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 01:46:38 PDT 2019
grimar added inline comments.
================
Comment at: lld/ELF/Relocations.cpp:718
+ std::vector<Loc> Locs;
+ bool IsWarning;
+};
----------------
MaskRay wrote:
> grimar wrote:
> > Seems this field can be calculated at any time, does it worth to keep the precalculated value?
> `IsWarning` is computed on a per-symbol basis:
>
> ```
> bool CanBeExternal = !Sym.isLocal() && Sym.computeBinding() != STB_LOCAL &&
> Sym.Visibility == STV_DEFAULT;
>
> bool IsWarning =
> (Config->UnresolvedSymbols == UnresolvedPolicy::Warn && CanBeExternal) ||
> Config->NoinhibitExec;
>
> ```
Yes and we have `Symbol * UndefinedDiag::Sym` here, so can calculate it on fly I think.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63344/new/
https://reviews.llvm.org/D63344
More information about the llvm-commits
mailing list