diff options
| author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2025-11-17 09:38:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 09:38:02 -0800 |
| commit | a9a4515b0a442ea58826047b7efb9aa2bfe48749 (patch) | |
| tree | f96bc69bfc1a5878fb08795631a703a3171ad013 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | be6296ea8faccec5d2fbaa2625112e26a5deeb85 (diff) | |
[lld][MachO] Read cstring order for non deduped sections (#161879)
https://github.com/llvm/llvm-project/pull/140307 added support for
cstring hashes in the orderfile to layout cstrings in a specific order,
but only when `--deduplicate-strings` is used. This PR supports cstring
ordering when `--no-deduplicate-strings` is used.
1. Create `cStringPriorities`, separate from `priorities`, to hold only
priorities for cstring pieces. This allows us to lookup by hash
directly, instead of first converting to a string. It also fixes a
contrived bug where we want to order a symbol named `CSTR;12345` rather
than a cstring.
2. Rather than calling `buildCStringPriorities()` which always
constructs and returns a vector, we use `forEachStringPiece()` to
efficiently iterate over cstring pieces without creating a new vector if
no cstring is ordered.
3. Create `SymbolPriorityEntry::{get,set}Priority()` helper functions to
simplify code.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
