[all-commits] [llvm/llvm-project] e53e1d: [lldb] Change ObjectValueDictionary to use a Strin...

Alex via All-commits all-commits at lists.llvm.org
Mon May 1 16:18:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e53e1de57eccda49a93c4368eabbd95d01c5b854
      https://github.com/llvm/llvm-project/commit/e53e1de57eccda49a93c4368eabbd95d01c5b854
  Author: Alex Langford <alangford at apple.com>
  Date:   2023-05-01 (Mon, 01 May 2023)

  Changed paths:
    M lldb/include/lldb/Interpreter/OptionValueDictionary.h
    M lldb/source/Core/Disassembler.cpp
    M lldb/source/Interpreter/OptionValueDictionary.cpp
    M lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
    M lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
    M lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp
    M lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    M lldb/test/API/commands/settings/TestSettings.py
    M lldb/unittests/Interpreter/TestOptionValue.cpp

  Log Message:
  -----------
  [lldb] Change ObjectValueDictionary to use a StringMap

llvm has a structure for maps where the key's type is a string. Using
that also means that the keys for OptionValueDictionary don't stick
around forever in ConstString's StringPool (even after they are gone).

The only thing we lose here is ordering: iterating over the map where the keys
are ConstStrings guarantees that we iterate in alphabetical order.
StringMap makes no guarantees about the ordering when you iterate over
the entire map.

Differential Revision: https://reviews.llvm.org/D149482




More information about the All-commits mailing list