diff options
author | Fangrui Song <i@maskray.me> | 2023-07-19 19:59:13 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-07-19 19:59:13 -0700 |
commit | e88fee1fec6e69b7a1d55242146e9e311eebaba0 (patch) | |
tree | fca87a28c08c74c754b905c0f747351f8d8cf462 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | 60a2b9912514eb94f4d53dae4a727f8079c4c402 (diff) | |
download | llvm-e88fee1fec6e69b7a1d55242146e9e311eebaba0.zip llvm-e88fee1fec6e69b7a1d55242146e9e311eebaba0.tar.gz llvm-e88fee1fec6e69b7a1d55242146e9e311eebaba0.tar.bz2 |
AppleAcceleratorTable: Use MapVector to stabilize iteration order after D153066
Use a MapVector to stabilize the order and simplify future changes like
D142862 that change the StringMap hash function.
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index cdcb5bb..156e10c 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -11,6 +11,7 @@ //===----------------------------------------------------------------------===// #include "llvm-dwarfdump.h" +#include "llvm/ADT/MapVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallSet.h" #include "llvm/ADT/StringSet.h" @@ -463,7 +464,7 @@ static void filterByAccelName( static void findAllApple( DWARFContext &DICtx, raw_ostream &OS, std::function<StringRef(uint64_t RegNum, bool IsEH)> GetNameForDWARFReg) { - StringMap<llvm::SmallSet<DWARFDie, 2>> NameToDies; + MapVector<StringRef, llvm::SmallSet<DWARFDie, 2>> NameToDies; auto PushDIEs = [&](const AppleAcceleratorTable &Accel) { for (const auto &Entry : Accel.entries()) { |