[PATCH] D58577: [LLD][ELF] - Show symbols visibility in "undefined symbol..." error messages.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 17:15:31 PDT 2019
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/Relocations.cpp:687
+
+ std::string Msg = "undefined " + Visibility.str() +
+ "symbol: " + toString(Sym) + "\n>>> referenced by ";
----------------
nit: if you make Visibility a std::string, you could remove `str()`. But perhaps this is slightly more straightforward:
std::string Msg = "undefined ";
if (Sym.Visibility == STV_INTERNAL)
Msg += "internal ";
else if (Sym.Visibility == STV_HIDDEN)
Msg += "hidden ";
else if (Sym.Visibility == STV_PROTECTED)
Msg += "protected ";
Msg += "symbol: " + toString(Sym) + "\n>>> referenced by ";
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58577/new/
https://reviews.llvm.org/D58577
More information about the llvm-commits
mailing list