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:
Sean Callanan 2011-12-02 18:06:45 +00:00
parent e37a85af65
commit 3ed3bca38e
2 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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;