Author: Raphael Isemann Date: 2021-06-04T12:06:53+02:00 New Revision: 0a655c62eca878cd5f366c08a4a5fee1b8723ce8
URL: https://github.com/llvm/llvm-project/commit/0a655c62eca878cd5f366c08a4a5fee1b8723ce8 DIFF: https://github.com/llvm/llvm-project/commit/0a655c62eca878cd5f366c08a4a5fee1b8723ce8.diff LOG: [lldb][NFC] Remove a redundant call to weak_ptr::expired The `lock` call directly will check for us if the `weak_ptr` is expired and returns an invalid `shared_ptr` (which we correctly handle), so this check is redundant. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D103442 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 ec3bee2cbc5d5..494622fdd24ee 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -3792,7 +3792,7 @@ void SymbolFileDWARF::DumpClangAST(Stream &s) { } SymbolFileDWARFDebugMap *SymbolFileDWARF::GetDebugMapSymfile() { - if (m_debug_map_symfile == nullptr && !m_debug_map_module_wp.expired()) { + if (m_debug_map_symfile == nullptr) { lldb::ModuleSP module_sp(m_debug_map_module_wp.lock()); if (module_sp) { m_debug_map_symfile = _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits