summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-07-21 08:46:51 -0700
committerFangrui Song <i@maskray.me>2023-07-21 08:46:51 -0700
commit9996e71f2d73a76dc62eb12fc3012aae91014b27 (patch)
treefbe41b37c4adff027c74da0fa14ed9c799745940 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent6de59222e2ed90c9ab6d7e9703f4f3dcd8bdc627 (diff)
[Support] Implement LLVM_ENABLE_REVERSE_ITERATION for StringMap
ProgrammersManual.html says > StringMap iteration order, however, is not guaranteed to be deterministic, so any uses which require that should instead use a std::map. This patch makes -DLLVM_REVERSE_ITERATION=on (currently -DLLVM_ENABLE_REVERSE_ITERATION=on works as well) shuffle StringMap iteration order (actually flipping the hash so that elements not in the same bucket are reversed) to catch violations, similar to D35043 for DenseMap. This should help change the hash function (e.g., D142862, D155781). With a lot of fixes, there are still some violations. This patch implements the "reverse_iteration" lit feature to skip such tests. Eventually we should remove this feature. `ninja check-{llvm,clang,clang-tools}` are clean with `#define LLVM_ENABLE_REVERSE_ITERATION 1`. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D155789
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions