[llvm] [llvm-gsymutil] Ensure stable ordering of merged functions (PR #120796)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 13:32:08 PST 2024
https://github.com/alx32 updated https://github.com/llvm/llvm-project/pull/120796
>From 8d64a8ee8caa9347af861409762918dac62a4cd2 Mon Sep 17 00:00:00 2001
From: Alex B <alexborcan at meta.com>
Date: Fri, 20 Dec 2024 13:23:55 -0800
Subject: [PATCH] [llvm-gsymutil] Ensure stable ordering of merged functions
---
llvm/lib/DebugInfo/GSYM/GsymCreator.cpp | 4 ++--
.../ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml | 4 ----
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
index eb26c637a2ca36..14078f5aaf9a46 100644
--- a/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
+++ b/llvm/lib/DebugInfo/GSYM/GsymCreator.cpp
@@ -200,8 +200,8 @@ void GsymCreator::prepareMergedFunctions(OutputAggregator &Out) {
if (Funcs.size() < 2)
return;
- // Sort the function infos by address range first
- llvm::sort(Funcs);
+ // Sort the function infos by address range first, preserving input order
+ llvm::stable_sort(Funcs);
std::vector<FunctionInfo> TopLevelFuncs;
// Add the first function info to the top level functions
diff --git a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml
index 001145c01398c5..4cecc79c72b4b3 100644
--- a/llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml
+++ b/llvm/test/tools/llvm-gsymutil/ARM_AArch64/macho-gsym-merged-callsites-dsym.yaml
@@ -1,7 +1,3 @@
-# FIXME: Currently disabled as it fails on some Linux hosts
-# UNSUPPORTED: true
-
-
## Test that reconstructs a dSYM file from YAML and generates a gsym from it. The gsym has callsite info and merged functions.
# RUN: split-file %s %t
More information about the llvm-commits
mailing list