[PATCH] D40014: [LLD] [COFF] Improve the autoexport check for symbols from import libraries with -opt:noref
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 15 22:22:35 PST 2017
mstorsjo added a comment.
In https://reviews.llvm.org/D40014#926966, @ruiu wrote:
> Please add comments to describe new code.
Ok, maybe like this?
// Only allow the symbol kinds that make sense to export;
// in particular, disallow import symbols.
if (!isa<DefinedRegular>(Sym) && !isa<DefinedCommon>(Sym))
And
// Check that file is non-null before dereferencing it,
// symbols not originating in regular object files probably shouldn't be exported.
if (!Sym->getFile())
https://reviews.llvm.org/D40014
More information about the llvm-commits
mailing list