Skip to content

Commit 0e58030

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
1 parent 0db702a commit 0e58030

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

llvm/include/llvm/IR/ModuleSummaryIndexYAML.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
#ifndef LLVM_IR_MODULESUMMARYINDEXYAML_H
1010
#define LLVM_IR_MODULESUMMARYINDEXYAML_H
1111

12+
#include "llvm/ADT/StringRef.h"
1213
#include "llvm/IR/ModuleSummaryIndex.h"
1314
#include "llvm/Support/YAMLTraits.h"
15+
#include <algorithm>
1416

1517
namespace llvm {
1618
namespace yaml {
@@ -345,11 +347,13 @@ template <> struct MappingTraits<ModuleSummaryIndex> {
345347
index.WithGlobalValueDeadStripping);
346348

347349
if (io.outputting()) {
348-
std::vector<std::string> CfiFunctionDefs(index.CfiFunctionDefs.begin(),
349-
index.CfiFunctionDefs.end());
350+
std::vector<StringRef> CfiFunctionDefs(index.CfiFunctionDefs.begin(),
351+
index.CfiFunctionDefs.end());
352+
std::sort(CfiFunctionDefs.begin(), CfiFunctionDefs.end());
350353
io.mapOptional("CfiFunctionDefs", CfiFunctionDefs);
351-
std::vector<std::string> CfiFunctionDecls(index.CfiFunctionDecls.begin(),
352-
index.CfiFunctionDecls.end());
354+
std::vector<StringRef> CfiFunctionDecls(index.CfiFunctionDecls.begin(),
355+
index.CfiFunctionDecls.end());
356+
std::sort(CfiFunctionDecls.begin(), CfiFunctionDecls.end());
353357
io.mapOptional("CfiFunctionDecls", CfiFunctionDecls);
354358
} else {
355359
std::vector<std::string> CfiFunctionDefs;

0 commit comments

Comments
 (0)