File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -1939,11 +1939,8 @@ bool AndroidPackedRelocationSection<ELFT>::updateAllocSize(Ctx &ctx) {
19391939 // For Rela, we also want to sort by r_addend when r_info is the same. This
19401940 // enables us to group by r_addend as well.
19411941 llvm::sort (nonRelatives, [](const Elf_Rela &a, const Elf_Rela &b) {
1942- if (a.r_info != b.r_info )
1943- return a.r_info < b.r_info ;
1944- if (a.r_addend != b.r_addend )
1945- return a.r_addend < b.r_addend ;
1946- return a.r_offset < b.r_offset ;
1942+ return std::tie (a.r_info , a.r_addend , a.r_offset ) <
1943+ std::tie (b.r_info , b.r_addend , b.r_offset );
19471944 });
19481945
19491946 // Group relocations with the same r_info. Note that each group emits a group
Original file line number Diff line number Diff line change @@ -535,11 +535,9 @@ void UnwindInfoSectionImpl::finalize() {
535535 llvm::sort (commonEncodings,
536536 [](const std::pair<compact_unwind_encoding_t , size_t > &a,
537537 const std::pair<compact_unwind_encoding_t , size_t > &b) {
538- if (a.second == b.second )
539- // When frequencies match, secondarily sort on encoding
540- // to maintain parity with validate-unwind-info.py
541- return a.first > b.first ;
542- return a.second > b.second ;
538+ // When frequencies match, secondarily sort on encoding
539+ // to maintain parity with validate-unwind-info.py
540+ return std::tie (a.second , a.first ) > std::tie (b.second , b.first );
543541 });
544542
545543 // Truncate the vector to 127 elements.
You can’t perform that action at this time.
0 commit comments