Fix a bug in DebugInfo lib, extend a comment for one of the methods

llvm-svn: 159707
This commit is contained in:
Alexey Samsonov 2012-07-04 09:42:54 +00:00
parent e06a8887d8
commit 5cbbf4ca57
2 changed files with 3 additions and 3 deletions

View File

@ -239,8 +239,8 @@ DWARFCompileUnit::buildAddressRangeTable(DWARFDebugAranges *debug_aranges,
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];
}

View File

@ -43,7 +43,7 @@ public:
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);