Index: lldb/include/lldb/Core/DataFileCache.h =================================================================== --- lldb/include/lldb/Core/DataFileCache.h +++ lldb/include/lldb/Core/DataFileCache.h @@ -15,6 +15,7 @@ #include "lldb/lldb-forward.h" #include "llvm/Support/Caching.h" #include +#include namespace lldb_private { @@ -190,7 +191,7 @@ private: std::vector m_strings; - std::map m_string_to_offset; + std::unordered_map m_string_to_offset; /// Skip one byte to start the string table off with an empty string. uint32_t m_next_offset = 1; }; Index: lldb/include/lldb/Utility/ConstString.h =================================================================== --- lldb/include/lldb/Utility/ConstString.h +++ lldb/include/lldb/Utility/ConstString.h @@ -464,6 +464,16 @@ } } // namespace llvm +namespace std { + +template <> struct hash { + std::size_t operator()(const lldb_private::ConstString &str) const { + return reinterpret_cast(str.GetCString()); + } +}; + +} // namespace std + LLVM_YAML_IS_SEQUENCE_VECTOR(lldb_private::ConstString) #endif // LLDB_UTILITY_CONSTSTRING_H