[llvm-commits] [patch] Small cleanups to the gold plugin
nlewycky at google.com
Sun Jun 6 12:56:14 PDT 2010
- as_path = strdup(opt + 3);
+ as_path = opt.substr(3);
Please use opt.substr(strlen("as="));. I really like that idiom which you
used later on in the function. :-)
(*message)(LDPL_WARNING, "Path to the output IL file specified
- "Discarding %s", opt);
+ "Discarding %s", opt.str());
How does that work? opt is an llvm::StringRef whose str() method returns an
std::string not a char*.
The rest of the patch looks great, thanks!
On 3 June 2010 15:11, Rafael Espindola <espindola at google.com> wrote:
> The attached patch contains some cleanups to the plugin code. Mostly
> using std::string and llvm::StringRef.
> Rafael Ávila de Espíndola
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits