File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 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
1517namespace llvm {
1618namespace 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;
You can’t perform that action at this time.
0 commit comments