[llvm] [NFC][YAML] Switch `std::sort` to `llvm::sort` (PR #130448)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 8 16:06:35 PST 2025


https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/130448

None

>From 8a1b1c7e303ae66b960fe11735b5b4f7eb90f7d9 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Sat, 8 Mar 2025 16:06:20 -0800
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.4
---
 llvm/include/llvm/IR/ModuleSummaryIndexYAML.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h b/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
index adcd17783d6c0..b662013d1f998 100644
--- a/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
+++ b/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
@@ -349,11 +349,11 @@ template <> struct MappingTraits<ModuleSummaryIndex> {
     if (io.outputting()) {
       std::vector<StringRef> CfiFunctionDefs(index.CfiFunctionDefs.begin(),
                                              index.CfiFunctionDefs.end());
-      std::sort(CfiFunctionDefs.begin(), CfiFunctionDefs.end());
+      llvm::sort(CfiFunctionDefs);
       io.mapOptional("CfiFunctionDefs", CfiFunctionDefs);
       std::vector<StringRef> CfiFunctionDecls(index.CfiFunctionDecls.begin(),
                                               index.CfiFunctionDecls.end());
-      std::sort(CfiFunctionDecls.begin(), CfiFunctionDecls.end());
+      llvm::sort(CfiFunctionDecls);
       io.mapOptional("CfiFunctionDecls", CfiFunctionDecls);
     } else {
       std::vector<std::string> CfiFunctionDefs;



More information about the llvm-commits mailing list