Skip to content

Commit 04f5eb4

Browse files
committed
[lld/mac] Fix start-stop.s test with expensive checks enabled
See e.g. https://lab.llvm.org/buildbot/#/builders/16/builds/14317 Not 100% sure why this fails yet, but this fixes it. Let's get the bots green again first :) Differential Revision: https://reviews.llvm.org/D106711
1 parent c2c4313 commit 04f5eb4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lld/MachO/OutputSegment.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,8 @@ void OutputSegment::sortOutputSections() {
146146
}
147147

148148
void macho::sortOutputSegments() {
149-
// sort() instead of stable_sort() is fine because segmentOrder() is
150-
// name-based and getOrCreateOutputSegment() makes there's only a single
151-
// segment for every name.
152-
llvm::sort(outputSegments, compareByOrder<OutputSegment *>(segmentOrder));
149+
llvm::stable_sort(outputSegments,
150+
compareByOrder<OutputSegment *>(segmentOrder));
153151
}
154152

155153
static DenseMap<StringRef, OutputSegment *> nameToOutputSegment;

0 commit comments

Comments
 (0)