Skip to content

Commit 8d64a8e

Browse files
author
Alex B
committed
[llvm-gsymutil] Ensure stable ordering of merged functions
1 parent 8a62104 commit 8d64a8e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

llvm/lib/DebugInfo/GSYM/GsymCreator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ void GsymCreator::prepareMergedFunctions(OutputAggregator &Out) {
200200
if (Funcs.size() < 2)
201201
return;
202202

203-
// Sort the function infos by address range first
204-
llvm::sort(Funcs);
203+
// Sort the function infos by address range first, preserving input order
204+
llvm::stable_sort(Funcs);
205205
std::vector<FunctionInfo> TopLevelFuncs;
206206

207207
// Add the first function info to the top level functions

llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# FIXME: Currently disabled as it fails on some Linux hosts
2-
# UNSUPPORTED: true
3-
4-
51
## Test that reconstructs a dSYM file from YAML and generates a gsym from it. The gsym has callsite info and merged functions.
62

73
# RUN: split-file %s %t

0 commit comments

Comments
 (0)