[llvm-commits] [llvm] r159707 - in /llvm/trunk/lib/DebugInfo: DWARFCompileUnit.cpp DWARFCompileUnit.h

Alexey Samsonov samsonov at google.com
Thu Jul 5 04:04:36 PDT 2012


On Thu, Jul 5, 2012 at 12:07 AM, Eric Christopher <echristo at apple.com>wrote:

>
> On Jul 4, 2012, at 2:42 AM, Alexey Samsonov wrote:
>
> > Author: samsonov
> > Date: Wed Jul  4 04:42:54 2012
> > New Revision: 159707
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=159707&view=rev
> > Log:
> > Fix a bug in DebugInfo lib, extend a comment for one of the methods
> >
>
> To echo Bill please don't make any commits like this again. Also if you
> could
> update the comment in the code you fixed to explain what's going on since
> it
> was obviously not obvious what the code should be doing :)
>

This commit was up a fixup for r159512 I landed recently. I fixed an
incorrect usage
of one of the methods, and updated the comment for this method to
explicitly describe
the meaning of its return value. I should have written all this in commit
message, yes :(


>
> -eric
>
> > Modified:
> >    llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp
> >    llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h
> >
> > Modified: llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp?rev=159707&r1=159706&r2=159707&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp (original)
> > +++ llvm/trunk/lib/DebugInfo/DWARFCompileUnit.cpp Wed Jul  4 04:42:54
> 2012
> > @@ -239,8 +239,8 @@
> >
> > const DWARFDebugInfoEntryMinimal*
> > DWARFCompileUnit::getFunctionDIEForAddress(int64_t address) {
> > -  size_t n = extractDIEsIfNeeded(false);
> > -  for (size_t i = 0; i != n; i++) {
> > +  extractDIEsIfNeeded(false);
> > +  for (size_t i = 0, n = DieArray.size(); i != n; i++) {
> >     if (DieArray[i].addressRangeContainsAddress(this, address))
> >       return &DieArray[i];
> >   }
> >
> > Modified: llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h?rev=159707&r1=159706&r2=159707&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h (original)
> > +++ llvm/trunk/lib/DebugInfo/DWARFCompileUnit.h Wed Jul  4 04:42:54 2012
> > @@ -43,7 +43,7 @@
> >                    const DWARFAbbreviationDeclarationSet *abbrevs);
> >
> >   /// extractDIEsIfNeeded - Parses a compile unit and indexes its DIEs
> if it
> > -  /// hasn't already been done.
> > +  /// hasn't already been done. Returns the number of DIEs parsed at
> this call.
> >   size_t extractDIEsIfNeeded(bool cu_die_only);
> >   void clear();
> >   void dump(raw_ostream &OS);
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120705/3c955466/attachment.html>


More information about the llvm-commits mailing list