AccelTable: Use MapVector to stabilize iteration order
authorFangrui Song <i@maskray.me>
Thu, 20 Jul 2023 02:50:36 +0000 (19:50 -0700)
committerFangrui Song <i@maskray.me>
Thu, 20 Jul 2023 02:50:36 +0000 (19:50 -0700)
commit60a2b9912514eb94f4d53dae4a727f8079c4c402
tree05f3f7da8af7c1d5c552c894e7ccc1b0ecfd4b04
parentb71e1f6fe575e0e0e2acddcfad37ca8000036863
AccelTable: Use MapVector to stabilize iteration order

Entries of the same DJB hash are in the hash lookup table/name table are
ordered by the iteration order of `Entries` (a StringMap). Change
`Entries` to a MapVector to stabilize the order and simplify future
changes like D142862 that change the StringMap hash function.
llvm/include/llvm/CodeGen/AccelTable.h
llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp
llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll
llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll