[PATCH] D11839: Adding SymbolRef::getSectionName for getting a textual section name for the symbol. Updating llvm-objdump to use this

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 13:58:31 PDT 2015


ruiu added inline comments.

================
Comment at: include/llvm/Object/ELFObjectFile.h:533
@@ +532,3 @@
+ELFObjectFile<ELFT>::getSymbolSectionName(DataRefImpl Symb) const {
+  auto Symbol = getSymbol(Symb);
+  uint32_t Index = Symbol->st_shndx;
----------------
colinl wrote:
> rafael wrote:
> > I don't think we use auto in cases like this.
> I can change it to ELFFile<ELFT>::Elf_Sym *.  Seems a little unfortunate because shortening typenames like this seems like what auto is for.
We don't use "auto" if its type is not obvious from the very narrow context. I don't use "auto" unless the real type appears on the right-hand side.


Repository:
  rL LLVM

http://reviews.llvm.org/D11839





More information about the llvm-commits mailing list