-        as_path = strdup(opt + 3);<br>+        as_path = opt.substr(3);<br><br>Please use opt.substr(strlen("as="));. I really like that idiom which you used later on in the function. :-)<br><br>         (*message)(LDPL_WARNING, "Path to the output IL file specified twice. "<br>

-                   "Discarding %s", opt);<br>+                   "Discarding %s", opt.str());<br><br>How does that work? opt is an llvm::StringRef whose str() method returns an std::string not a char*.<br>

<br>The rest of the patch looks great, thanks!<br><br>Nick<br><br><div class="gmail_quote">On 3 June 2010 15:11, Rafael Espindola <span dir="ltr"><<a href="mailto:espindola@google.com">espindola@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The attached patch contains some cleanups to the plugin code. Mostly<br>
using std::string and llvm::StringRef.<br>
<br>
Cheers,<br>
<font color="#888888">--<br>
Rafael Ávila de Espíndola<br>
</font></blockquote></div><br>