Skip to content

Commit 8da7abb

Browse files
committed
[dsymutil] Sort entries in YamlDMO to stabilize print order
Similar to the llvm::sort call in DebugMapObject::print.
1 parent b87ff36 commit 8da7abb

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

llvm/test/tools/dsymutil/absolute_symbol.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ might conflict with other real symbols in the same file.
1515

1616
CHECK: objc_class_name_Foo
1717
CHECK-NOT: objAddr
18+
CHECK: }

llvm/tools/dsymutil/DebugMap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ MappingTraits<dsymutil::DebugMapObject>::YamlDMO::YamlDMO(
229229
for (auto &Entry : Obj.Symbols)
230230
Entries.push_back(
231231
std::make_pair(std::string(Entry.getKey()), Entry.getValue()));
232+
llvm::sort(Entries, llvm::less_first());
232233
}
233234

234235
dsymutil::DebugMapObject

0 commit comments

Comments
 (0)