kimanh updated this revision to Diff 362287.
kimanh marked an inline comment as done.
kimanh added a comment.
Remove braces.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106355/new/
https://reviews.llvm.org/D106355
Files:
lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
Index: lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -125,6 +125,7 @@
void DebugNamesDWARFIndex::GetGlobalVariables(
const DWARFUnit &cu, llvm::function_ref<bool(DWARFDIE die)> callback) {
uint64_t cu_offset = cu.GetOffset();
+ bool found_entry_for_cu = false;
for (const DebugNames::NameIndex &ni: *m_debug_names_up) {
for (DebugNames::NameTableEntry nte: ni) {
uint64_t entry_offset = nte.getEntryOffset();
@@ -135,6 +136,7 @@
if (entry_or->getCUOffset() != cu_offset)
continue;
+ found_entry_for_cu = true;
if (!ProcessEntry(*entry_or, callback,
llvm::StringRef(nte.getString())))
return;
@@ -142,8 +144,10 @@
MaybeLogLookupError(entry_or.takeError(), ni, nte.getString());
}
}
-
- m_fallback.GetGlobalVariables(cu, callback);
+ // If no name index for that particular CU was found, fallback to
+ // creating the manual index.
+ if (!found_entry_for_cu)
+ m_fallback.GetGlobalVariables(cu, callback);
}
void DebugNamesDWARFIndex::GetCompleteObjCClass(
Index: lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -125,6 +125,7 @@
void DebugNamesDWARFIndex::GetGlobalVariables(
const DWARFUnit &cu, llvm::function_ref<bool(DWARFDIE die)> callback) {
uint64_t cu_offset = cu.GetOffset();
+ bool found_entry_for_cu = false;
for (const DebugNames::NameIndex &ni: *m_debug_names_up) {
for (DebugNames::NameTableEntry nte: ni) {
uint64_t entry_offset = nte.getEntryOffset();
@@ -135,6 +136,7 @@
if (entry_or->getCUOffset() != cu_offset)
continue;
+ found_entry_for_cu = true;
if (!ProcessEntry(*entry_or, callback,
llvm::StringRef(nte.getString())))
return;
@@ -142,8 +144,10 @@
MaybeLogLookupError(entry_or.takeError(), ni, nte.getString());
}
}
-
- m_fallback.GetGlobalVariables(cu, callback);
+ // If no name index for that particular CU was found, fallback to
+ // creating the manual index.
+ if (!found_entry_for_cu)
+ m_fallback.GetGlobalVariables(cu, callback);
}
void DebugNamesDWARFIndex::GetCompleteObjCClass(
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits