.debug_gnu_pub{names,types}: Stabilize iteration order
authorFangrui Song <i@maskray.me>
Thu, 20 Jul 2023 06:30:30 +0000 (23:30 -0700)
committerFangrui Song <i@maskray.me>
Thu, 20 Jul 2023 06:30:30 +0000 (23:30 -0700)
commitb215a2c885871e6ab67ad2f332f41e265959b7b8
tree3a55f1862f9d5068d37b1fd71b81052133b10ac1
parent76fd79b9d537c5589f4e26dd7f5660d3c69d397a
.debug_gnu_pub{names,types}: Stabilize iteration order

StringMap iteration order is not guaranteed to be deterministic
(https://llvm.org/docs/ProgrammersManual.html#llvm-adt-stringmap-h).
Sort by DIE offset (which looks like a pre-order traversal order).
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll
llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll
llvm/test/DebugInfo/X86/gnu-public-names-tu.ll
llvm/test/DebugInfo/X86/gnu-public-names.ll