<br><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 12:07 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@apple.com" target="_blank">echristo@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 class="im"><br>
On Jul 4, 2012, at 2:42 AM, Alexey Samsonov wrote:<br>
<br>
</div><div class="im">> Author: samsonov<br>
> Date: Wed Jul  4 04:42:54 2012<br>
> New Revision: 159707<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=159707&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=159707&view=rev</a><br>
> Log:<br>
> Fix a bug in DebugInfo lib, extend a comment for one of the methods<br>
><br>
<br>
</div>To echo Bill please don't make any commits like this again. Also if you could<br>
update the comment in the code you fixed to explain what's going on since it<br>
was obviously not obvious what the code should be doing :)<br></blockquote><div><br></div><div>This commit was up a fixup for r<span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">159512 I landed recently. I fixed an incorrect usage</span></div>
<div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">of one of the methods, and updated the comment for this method to explicitly describe</span></div><div><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">the meaning of its return value. I should have written all this in commit message, yes :(</span></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-eric<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> Modified:<br>
>    llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp<br>
>    llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h<br>
><br>
> Modified: llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp?rev=159707&r1=159706&r2=159707&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp?rev=159707&r1=159706&r2=159707&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp (original)<br>
> +++ llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp Wed Jul  4 04:42:54 2012<br>
> @@ -239,8 +239,8 @@<br>
><br>
> const DWARFDebugInfoEntryMinimal*<br>
> DWARFCompileUnit::getFunctionDIEForAddress(int64_t address) {<br>
> -  size_t n = extractDIEsIfNeeded(false);<br>
> -  for (size_t i = 0; i != n; i++) {<br>
> +  extractDIEsIfNeeded(false);<br>
> +  for (size_t i = 0, n = DieArray.size(); i != n; i++) {<br>
>     if (DieArray[i].addressRangeContainsAddress(this, address))<br>
>       return &DieArray[i];<br>
>   }<br>
><br>
> Modified: llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h?rev=159707&r1=159706&r2=159707&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h?rev=159707&r1=159706&r2=159707&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h (original)<br>
> +++ llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h Wed Jul  4 04:42:54 2012<br>
> @@ -43,7 +43,7 @@<br>
>                    const DWARFAbbreviationDeclarationSet *abbrevs);<br>
><br>
>   /// extractDIEsIfNeeded - Parses a compile unit and indexes its DIEs if it<br>
> -  /// hasn't already been done.<br>
> +  /// hasn't already been done. Returns the number of DIEs parsed at this call.<br>
>   size_t extractDIEsIfNeeded(bool cu_die_only);<br>
>   void clear();<br>
>   void dump(raw_ostream &OS);<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>