[PATCH] D44357: [COFF] Adjust how we flag weak externals
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 20 13:32:05 PDT 2018
pcc added inline comments.
================
Comment at: lib/Object/COFFObjectFile.cpp:223
+ const coff_aux_weak_external *awe = Symb.getWeakExternal();
+ if (!awe || awe->Characteristics != COFF::IMAGE_WEAK_EXTERN_SEARCH_ALIAS)
+ Result |= SymbolRef::SF_Undefined;
----------------
There should always be an auxiliary record for weak externals so you could replace the outer if with `if (const coff_aux_weak_external *awe = Symb.getWeakExternal())` and simplify the check here.
https://reviews.llvm.org/D44357
More information about the llvm-commits
mailing list