forked from OSchip/llvm-project
Modified the Objective-C type map in SymbolFileSymtab
to use ConstStrings. The const char*s were assumed to be from ConstStrings before, but since storing a full-on ConstString is no more expensive than storing a const char* it makes better sense to enforce uniqueness with the type checker. llvm-svn: 145688
This commit is contained in:
parent
e37a85af65
commit
3ed3bca38e
|
@ -396,7 +396,7 @@ SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, const lldb_p
|
|||
|
||||
if (HasObjCSymbols())
|
||||
{
|
||||
TypeMap::iterator iter = m_objc_class_types.find(name.AsCString());
|
||||
TypeMap::iterator iter = m_objc_class_types.find(name);
|
||||
|
||||
if (iter != m_objc_class_types.end())
|
||||
{
|
||||
|
@ -510,7 +510,7 @@ SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, const lldb_p
|
|||
objc_object_type,
|
||||
Type::eResolveStateFull));
|
||||
|
||||
m_objc_class_types[name.AsCString()] = type;
|
||||
m_objc_class_types[name] = type;
|
||||
|
||||
types.Insert(type);
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ protected:
|
|||
std::vector<uint32_t> m_data_indexes;
|
||||
std::vector<uint32_t> m_addr_indexes; // Anything that needs to go into an search by address
|
||||
|
||||
typedef std::map<const char *, lldb::TypeSP> TypeMap;
|
||||
typedef std::map<lldb_private::ConstString, lldb::TypeSP> TypeMap;
|
||||
|
||||
TypeMap m_objc_class_types;
|
||||
|
||||
|
|
Loading…
Reference in New Issue