From 322654a7f702711670ecca318d3a75e68b01575d Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Thu, 29 Mar 2012 20:50:37 +0000 Subject: [PATCH] Line tables when using DWARF in .o files can be wrong when two entries get moved around by the compiler. This was due to incorrect logic in the line entry comparison operator. llvm-svn: 153685 --- lldb/source/Symbol/LineTable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Symbol/LineTable.cpp b/lldb/source/Symbol/LineTable.cpp index 539645e81b7c..29ab51ee7533 100644 --- a/lldb/source/Symbol/LineTable.cpp +++ b/lldb/source/Symbol/LineTable.cpp @@ -119,6 +119,8 @@ LineTable::Entry::LessThanBinaryPredicate::operator() (const LineTable::Entry& a { #define LT_COMPARE(a,b) if (a != b) return a < b LT_COMPARE (a.sect_offset, b.sect_offset); + // b and a reversed on purpose below. + LT_COMPARE (b.is_terminal_entry, a.is_terminal_entry); LT_COMPARE (a.line, b.line); LT_COMPARE (a.column, b.column); LT_COMPARE (a.is_start_of_statement, b.is_start_of_statement); @@ -126,8 +128,6 @@ LineTable::Entry::LessThanBinaryPredicate::operator() (const LineTable::Entry& a // b and a reversed on purpose below. LT_COMPARE (b.is_prologue_end, a.is_prologue_end); LT_COMPARE (a.is_epilogue_begin, b.is_epilogue_begin); - // b and a reversed on purpose below. - LT_COMPARE (b.is_terminal_entry, a.is_terminal_entry); LT_COMPARE (a.file_idx, b.file_idx); return false; #undef LT_COMPARE