<br><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 2:22 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</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">Bill Wendling wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Jul 4, 2012, at 2:42 AM, Alexey Samsonov wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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-<u></u>project?rev=159707&view=rev</a><br>
Log:<br>
Fix a bug in DebugInfo lib,<br>
</blockquote>
<br>
Please be more descriptive of *what* you're fixing and not the fact that you *are* fixing something.<br>
<br>
This isn't to single you out, Alexey. But there have been *way* too many of these types of commit messages recently. They are almost as bad as having no commit message at all.<br>
</blockquote>
<br></div>
Also, if this is a bug fix, where's the regression test?<br></blockquote><div><br></div><div>The bug happens only when function is called for the second time. Currently the only client of libDebugInfo is llvm-dwarfdump, which can never call it twice.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Nick<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-bw<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
extend a comment for one of the methods<br>
<br>
Modified:<br>
    llvm/trunk/lib/DebugInfo/<u></u>DWARFCompileUnit.cpp<br>
    llvm/trunk/lib/DebugInfo/<u></u>DWARFCompileUnit.h<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/<u></u>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-<u></u>project/llvm/trunk/lib/<u></u>DebugInfo/DWARFCompileUnit.<u></u>cpp?rev=159707&r1=159706&r2=<u></u>159707&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- llvm/trunk/lib/DebugInfo/<u></u>DWARFCompileUnit.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/<u></u>DWARFCompileUnit.cpp Wed Jul  4 04:42:54 2012<br>
@@ -239,8 +239,8 @@<br>
<br>
const DWARFDebugInfoEntryMinimal*<br>
DWARFCompileUnit::<u></u>getFunctionDIEForAddress(<u></u>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].<u></u>addressRangeContainsAddress(<u></u>this, address))<br></div>
       return&DieArray[i];<div class="im"><br>
   }<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/<u></u>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-<u></u>project/llvm/trunk/lib/<u></u>DebugInfo/DWARFCompileUnit.h?<u></u>rev=159707&r1=159706&r2=<u></u>159707&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- llvm/trunk/lib/DebugInfo/<u></u>DWARFCompileUnit.h (original)<br>
+++ llvm/trunk/lib/DebugInfo/<u></u>DWARFCompileUnit.h Wed Jul  4 04:42:54 2012<br>
@@ -43,7 +43,7 @@<br>
                    const DWARFAbbreviationDeclarationSe<u></u>t *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>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvm-commits</a><br>
</div></blockquote><div class="im">
<br>
______________________________<u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/llvm-commits</a><br>
<br>
</div></blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>