From 7fed546d1996271dabc7cf71d4d033125c4da4ee Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 13 Jan 2016 20:06:56 +0000 Subject: Vendor import of lldb trunk r257626: https://llvm.org/svn/llvm-project/lldb/trunk@257626 --- source/Symbol/LineTable.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/Symbol/LineTable.cpp') diff --git a/source/Symbol/LineTable.cpp b/source/Symbol/LineTable.cpp index 01c171886430..f9a42a7d14af 100644 --- a/source/Symbol/LineTable.cpp +++ b/source/Symbol/LineTable.cpp @@ -143,6 +143,13 @@ LineTable::InsertSequence (LineSequence* sequence) entry_collection::iterator end_pos = m_entries.end(); LineTable::Entry::LessThanBinaryPredicate less_than_bp(this); entry_collection::iterator pos = upper_bound(begin_pos, end_pos, entry, less_than_bp); + + // We should never insert a sequence in the middle of another sequence + if (pos != begin_pos) { + while (pos < end_pos && !((pos - 1)->is_terminal_entry)) + pos++; + } + #ifdef LLDB_CONFIGURATION_DEBUG // If we aren't inserting at the beginning, the previous entry should // terminate a sequence. -- cgit v1.3