git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159707
91177308-0d34-0410-b5e6-
96231b3b80d8
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];
}
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);