[Lldb-commits] [lldb] 6bca093 - SymbolFile: invert condition, remove unnecessary `else` (NFC)
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Fri May 5 07:31:41 PDT 2023
Author: Saleem Abdulrasool
Date: 2023-05-05T07:31:19-07:00
New Revision: 6bca093976ef40f36a396b11a61a44dc0f4dcd13
URL: https://github.com/llvm/llvm-project/commit/6bca093976ef40f36a396b11a61a44dc0f4dcd13
DIFF: https://github.com/llvm/llvm-project/commit/6bca093976ef40f36a396b11a61a44dc0f4dcd13.diff
LOG: SymbolFile: invert condition, remove unnecessary `else` (NFC)
Remove an unnecessary `else` condition and swap the condition to be
positive rather than negative to make simpler to follow. NFC
Added:
Modified:
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 674977cd7b59a..e40752b9ff21b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1636,10 +1636,9 @@ bool SymbolFileDWARF::GetFunction(const DWARFDIE &die, SymbolContext &sc) {
lldb::ModuleSP SymbolFileDWARF::GetExternalModule(ConstString name) {
UpdateExternalModuleListIfNeeded();
const auto &pos = m_external_type_modules.find(name);
- if (pos != m_external_type_modules.end())
- return pos->second;
- else
+ if (pos == m_external_type_modules.end())
return lldb::ModuleSP();
+ return pos->second;
}
DWARFDIE
More information about the lldb-commits
mailing list