[PATCH] D29632: Use ELF dynamic symbols for disassembly

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 07:12:23 PST 2017


Sam Parker via Phabricator via llvm-commits
<llvm-commits at lists.llvm.org> writes:
> +template <class ELFT> static void
> +addDynamicElfSymbols(const ELFObjectFile<ELFT> *Obj,
> +                     std::map<SectionRef, SectionSymbolsTy> &AllSymbols) {
> +  for (auto Symbol : Obj->getDynamicSymbolIterators()) {
> +    uint8_t SymbolType = Symbol.getELFType();
> +    if (SymbolType == ELF::STT_FUNC && Symbol.getSize () != 0) {

Invert the condition and use a continue to reduce indentation.


LGTM with that.

Cheers,
Rafael


More information about the llvm-commits mailing list