aboutsummaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARFCompileUnit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/DWARFCompileUnit.cpp')
-rw-r--r--lib/DebugInfo/DWARFCompileUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/DebugInfo/DWARFCompileUnit.cpp b/lib/DebugInfo/DWARFCompileUnit.cpp
index 2683990e58..6d4c7df8dc 100644
--- a/lib/DebugInfo/DWARFCompileUnit.cpp
+++ b/lib/DebugInfo/DWARFCompileUnit.cpp
@@ -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];
}