[PATCH] D40824: toString function take a const refs where possible

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 20:31:47 PST 2017


ruiu added inline comments.


================
Comment at: Common/Reproduce.cpp:58
 
-std::string lld::toString(opt::Arg *Arg) {
-  std::string K = Arg->getSpelling();
-  if (Arg->getNumValues() == 0)
+std::string lld::toString(const opt::Arg &Arg) {
+  std::string K = Arg.getSpelling();
----------------
Did you have to change * to &?


https://reviews.llvm.org/D40824





More information about the llvm-commits mailing list