[Lldb-commits] [lldb] r369179 - Simplify code (NFC).
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 16 17:38:58 PDT 2019
Author: adrian
Date: Fri Aug 16 17:38:58 2019
New Revision: 369179
URL: http://llvm.org/viewvc/llvm-project?rev=369179&view=rev
Log:
Simplify code (NFC).
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=369179&r1=369178&r2=369179&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Aug 16 17:38:58 2019
@@ -2502,32 +2502,29 @@ size_t SymbolFileDWARF::FindTypes(const
m_index->GetTypes(name, die_offsets);
const size_t num_die_matches = die_offsets.size();
- if (num_die_matches) {
- size_t num_matches = 0;
- for (size_t i = 0; i < num_die_matches; ++i) {
- const DIERef &die_ref = die_offsets[i];
- DWARFDIE die = GetDIE(die_ref);
+ size_t num_matches = 0;
+ for (size_t i = 0; i < num_die_matches; ++i) {
+ const DIERef &die_ref = die_offsets[i];
+ DWARFDIE die = GetDIE(die_ref);
- if (die) {
- std::vector<CompilerContext> die_context;
- die.GetDeclContext(die_context);
- if (die_context != context)
- continue;
+ if (die) {
+ std::vector<CompilerContext> die_context;
+ die.GetDeclContext(die_context);
+ if (die_context != context)
+ continue;
- Type *matching_type = ResolveType(die, true, true);
- if (matching_type) {
- // We found a type pointer, now find the shared pointer form our type
- // list
- types.InsertUnique(matching_type->shared_from_this());
- ++num_matches;
- }
- } else {
- m_index->ReportInvalidDIERef(die_ref, name.GetStringRef());
+ Type *matching_type = ResolveType(die, true, true);
+ if (matching_type) {
+ // We found a type pointer, now find the shared pointer form our type
+ // list
+ types.InsertUnique(matching_type->shared_from_this());
+ ++num_matches;
}
+ } else {
+ m_index->ReportInvalidDIERef(die_ref, name.GetStringRef());
}
- return num_matches;
}
- return 0;
+ return num_matches;
}
CompilerDeclContext
More information about the lldb-commits
mailing list