[Lldb-commits] [lldb] [lldb][ELF] Move address class map into the symbol table (PR #91603)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu May 9 23:15:49 PDT 2024
================
@@ -23,6 +23,8 @@ class Symtab {
public:
typedef std::vector<uint32_t> IndexCollection;
typedef UniqueCStringMap<uint32_t> NameToIndexMap;
+ typedef std::map<lldb::addr_t, lldb_private::AddressClass>
+ FileAddressToAddressClassMap;
----------------
labath wrote:
This code depends on the map being sorted, which densemap isn't. According to the [llvm programmer's manual](https://llvm.org/docs/ProgrammersManual.html#map-like-containers-std-map-densemap-etc), the recommended data structure for a populate-then-query usage pattern is a sorted vector (though I would say that changing the data structure is not necessary for a patch like this).
https://github.com/llvm/llvm-project/pull/91603
More information about the lldb-commits
mailing list