File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -675,14 +675,8 @@ static void AttemptToFoldSymbolOffsetDifference(
675
675
if (FA == FB) {
676
676
Reverse = SA.getOffset () < SB.getOffset ();
677
677
} else if (!isa<MCDummyFragment>(FA)) {
678
- // Testing FA < FB is slow. Use setLayoutOrder to speed up computation.
679
- // The formal layout order will be finalized in MCAssembler::layout.
680
- if (FA->getLayoutOrder () == 0 || FB->getLayoutOrder ()== 0 ) {
681
- unsigned LayoutOrder = 0 ;
682
- for (MCFragment &F : *FA->getParent ())
683
- F.setLayoutOrder (++LayoutOrder);
684
- }
685
- Reverse = FA->getLayoutOrder () < FB->getLayoutOrder ();
678
+ Reverse = std::find_if (std::next (FA->getIterator ()), SecA.end (),
679
+ [&](auto &I) { return &I == FB; }) != SecA.end ();
686
680
}
687
681
688
682
uint64_t SAOffset = SA.getOffset (), SBOffset = SB.getOffset ();
You can’t perform that action at this time.
0 commit comments