Skip to content

Commit c92f204

Browse files
committed
[lld] BPSectionOrderer: stabilize iteration order with MapVector
1 parent 31db7af commit c92f204

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lld/include/lld/Common/BPSectionOrdererBase.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "llvm/ADT/CachedHashString.h"
2424
#include "llvm/ADT/DenseMap.h"
2525
#include "llvm/ADT/DenseSet.h"
26+
#include "llvm/ADT/MapVector.h"
2627
#include "llvm/ADT/SetVector.h"
2728
#include "llvm/ADT/SmallSet.h"
2829
#include "llvm/ADT/SmallVector.h"
@@ -92,7 +93,7 @@ static SmallVector<std::pair<unsigned, UtilityNodes>> getUnsForCompression(
9293
hashes.clear();
9394
}
9495

95-
DenseMap<uint64_t, unsigned> hashFrequency;
96+
MapVector<uint64_t, unsigned> hashFrequency;
9697
for (auto &[sectionIdx, hashes] : sectionHashes)
9798
for (auto hash : hashes)
9899
++hashFrequency[hash];

0 commit comments

Comments
 (0)