<div class="gmail_quote">I had trouble running the tests at first, but then I figured it out.</div><div class="gmail_quote"><br></div><div class="gmail_quote">In case you don't already know: one test (Driver/hello.c) fails, but does so with and without this patch applied.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">ZJ</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Jul 1, 2011 at 12:09 PM, Zach Wheeler <span dir="ltr"><<a href="mailto:zachw.foss@gmail.com">zachw.foss@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I forgot to initialize NameLen. :-/<div><div><br><div>I stored 'Name' as start+size because I saw that pattern in lib/Basic/DiagnosticID.h, and assumed it was expected. Storing a StringRef makes more sense to me. Here's an updated patch. Clang builds successfully, and hopefully the tests will pass.</div>


<div><br></div><div>ZJ<div><div></div><div class="h5"><br><br><div class="gmail_quote">

On Thu, Jun 30, 2011 at 4:04 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div><br>
On Jun 30, 2011, at 11:47 AM, Zach Wheeler wrote:<br>
<br>
> This patch changes the return type of Option::getName() from const char* to StringRef, doing away with the need for several calls to strlen.<br>
> Clang builds fine with these changes.<br>
<br>
</div>THis patch looks reasonable, except that it completely breaks the testsuite :).  Please track down the bug and resubmit a patch.  Also, why not just embed a 'Name' StringRef in Option.h instead of storing the start+size?<br>





<font color="#888888"><br>
-Chris<br>
<br>
</font></blockquote></div><br></div></div></div>
</div></div>
</blockquote></div><br>