[Lldb-commits] [PATCH] D68605: ObjectFileMachO: Replace std::map with llvm::DenseMap (NFC)

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 8 08:07:41 PDT 2019


labath added inline comments.


================
Comment at: lldb/include/lldb/Utility/ConstString.h:441
 protected:
+  template <typename T> friend struct ::llvm::DenseMapInfo;
+  /// Only used by DenseMapInfo.
----------------
You could declare the specific instantiation (DenseMapInfo<ConstString>) as a friend instead of the whole template.


================
Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:2496
   std::vector<TrieEntryWithOffset> trie_entries;
-  std::set<lldb::addr_t> resolver_addresses;
+  llvm::DenseSet<lldb::addr_t> resolver_addresses;
 
----------------
It looks like the values for these are coming straight from the object file (aka user input). Are you ok with asserting on "resolvers" like 0xff...ff ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68605/new/

https://reviews.llvm.org/D68605





More information about the lldb-commits mailing list