[PATCH] D25826: [ELF] Show error location for 'undefined symbol' errors

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 11:06:05 PDT 2016


ruiu added inline comments.


================
Comment at: ELF/InputFiles.cpp:407
+DefinedRegular<ELFT> *
+elf::ObjectFile<ELFT>::getEnclosingSymbol(InputSectionBase<ELFT> *S,
+                                          uintX_t Offset) {
----------------
evgeny777 wrote:
> ruiu wrote:
> > evgeny777 wrote:
> > > ruiu wrote:
> > > > This function can be implemented as a non-member function, no? Non-member functions are preferred over member functions if they access only public members.
> > > No, it can't. It iterates SymbolBodies, which is member variable.
> > But you can use ObjectFile::getSymbols() instead, no?
> Makes sense. May be also move it to Relocations.cpp?
Yeah, I'd do that and make this a static function.


https://reviews.llvm.org/D25826





More information about the llvm-commits mailing list