[PATCH] D31481: Change the error message format for undefined symbols.

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 12:17:26 PDT 2017


rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.

LGTM with a nit.



================
Comment at: lld/ELF/Relocations.cpp:623
+  std::string Obj = S.getObjMsg<ELFT>(Offset);
+  if (Src.empty() && !Obj.empty())
+    Msg += "\n>>> referenced by " + Obj;
----------------
Obj is never empty, is it?


================
Comment at: lld/ELF/Relocations.cpp:624
+  if (Src.empty() && !Obj.empty())
+    Msg += "\n>>> referenced by " + Obj;
+  else if (!Src.empty() && Obj.empty())
----------------
If Obj is never empty you can factor

Msg += "\n>>> referenced by "

before the if/else if chain.


https://reviews.llvm.org/D31481





More information about the llvm-commits mailing list