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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 12:43:43 PDT 2016

ruiu added inline comments.

Comment at: ELF/InputFiles.h:51
+// for each object file we link.
+template <class ELFT> class DIHelper {
I think this is too smart, at least as the initial implementation. This function is run only when an error occurs, and for error cases, we don't pursue performance. Instead I'd like to keep it simple as possible. So, could you please remove this class and define a non-member function? I think it is okay to parse debug info for each error message.

Comment at: ELF/Relocations.cpp:569-571
+    warn(Location, Msg);
+    error(Location, Msg);
Now that you can just concatenate strings before passing to the functions.

  warn(Location + ": " + Msg);
  error(Location + ": " + Msg);

So I think you don't need to add new overloaded functions to error.cpp.


More information about the llvm-commits mailing list