[Lldb-commits] [lldb] 3f9b6b2 - [lldb] Use llvm::stable_sort in Line

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 21 05:10:12 PST 2020


Author: Pavel Labath
Date: 2020-01-21T14:09:58+01:00
New Revision: 3f9b6b270f87430c28fb2ff811d3b58dbf8bfdde

URL: https://github.com/llvm/llvm-project/commit/3f9b6b270f87430c28fb2ff811d3b58dbf8bfdde
DIFF: https://github.com/llvm/llvm-project/commit/3f9b6b270f87430c28fb2ff811d3b58dbf8bfdde.diff

LOG: [lldb] Use llvm::stable_sort in Line

This addresses some post-commit feedback on D72909.

Added: 
    

Modified: 
    lldb/source/Symbol/LineTable.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Symbol/LineTable.cpp b/lldb/source/Symbol/LineTable.cpp
index 21e451021cd6..e95d09908f32 100644
--- a/lldb/source/Symbol/LineTable.cpp
+++ b/lldb/source/Symbol/LineTable.cpp
@@ -24,7 +24,7 @@ LineTable::LineTable(CompileUnit *comp_unit)
 LineTable::LineTable(CompileUnit *comp_unit, std::vector<LineSequence *> &sequences)
     : m_comp_unit(comp_unit), m_entries() {
   LineTable::Entry::LessThanBinaryPredicate less_than_bp(this);
-  std::sort(sequences.begin(), sequences.end(), less_than_bp);
+  llvm::stable_sort(sequences, less_than_bp);
   for (auto *sequence : sequences) {
     LineSequenceImpl *seq = reinterpret_cast<LineSequenceImpl *>(sequence);
     m_entries.insert(m_entries.end(), seq->m_entries.begin(),


        


More information about the lldb-commits mailing list