Author: Zequan Wu Date: 2022-02-03T15:41:26-08:00 New Revision: 8682947d24e1f623fad30e1261e1a3de59a36f28
URL: https://github.com/llvm/llvm-project/commit/8682947d24e1f623fad30e1261e1a3de59a36f28 DIFF: https://github.com/llvm/llvm-project/commit/8682947d24e1f623fad30e1261e1a3de59a36f28.diff LOG: [LLDB][NativePDB] terminal entry has lower precedence than new entry Added: Modified: lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp index c514cac655d68..cda9d42129d43 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp @@ -1119,8 +1119,13 @@ bool SymbolFileNativePDB::ParseLineTable(CompileUnit &comp_unit) { uint32_t lno = cur_info.getStartLine(); - line_set.emplace(addr, lno, 0, file_index, is_statement, false, - is_prologue, is_epilogue, false); + LineTable::Entry new_entry(addr, lno, 0, file_index, is_statement, false, + is_prologue, is_epilogue, false); + // Terminal entry has lower precedence than new entry. + auto iter = line_set.find(new_entry); + if (iter != line_set.end() && iter->is_terminal_entry) + line_set.erase(iter); + line_set.insert(new_entry); if (line_entry.GetRangeBase() != LLDB_INVALID_ADDRESS) { line_entry.SetRangeEnd(addr); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits