We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2c4313 commit 04f5eb4Copy full SHA for 04f5eb4
lld/MachO/OutputSegment.cpp
@@ -146,10 +146,8 @@ void OutputSegment::sortOutputSections() {
146
}
147
148
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));
+ llvm::stable_sort(outputSegments,
+ compareByOrder<OutputSegment *>(segmentOrder));
153
154
155
static DenseMap<StringRef, OutputSegment *> nameToOutputSegment;
0 commit comments