[Lldb-commits] [lldb] r145688 - in /lldb/trunk/source/Plugins/SymbolFile/Symtab: SymbolFileSymtab.cpp SymbolFileSymtab.h

Sean Callanan scallanan at apple.com
Fri Dec 2 10:06:45 PST 2011


Author: spyffe
Date: Fri Dec  2 12:06:45 2011
New Revision: 145688

URL: http://llvm.org/viewvc/llvm-project?rev=145688&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
    lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=145688&r1=145687&r2=145688&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Fri Dec  2 12:06:45 2011
@@ -396,7 +396,7 @@
     
     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 @@
                                     objc_object_type,
                                     Type::eResolveStateFull));
         
-        m_objc_class_types[name.AsCString()] = type;
+        m_objc_class_types[name] = type;
         
         types.Insert(type);
         

Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h?rev=145688&r1=145687&r2=145688&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h Fri Dec  2 12:06:45 2011
@@ -126,7 +126,7 @@
     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;
 





More information about the lldb-commits mailing list