<rdar://problem/13563628>

Introducing a negative cache for ObjCLanguageRuntime::LookupInCompleteClassCache()
This helps speed up the (common) case of us looking for classes that are hidden deep within Cocoa internals and repeatedly failing at finding type information for them.
In order for this to work, we need to clean this cache whenever debug information is added. A new symbols loaded event is added that is triggered with add-dsym (before modules loaded would be triggered for both adding modules and adding symbols).
Interested parties can register for this event. Internally, we make sure to clean the negative cache whenever symbols are added.
Lastly, ClassDescriptor::IsTagged() has been refactored to GetTaggedPointerInfo() that also (optionally) returns info and value bits. In this way, data formatters can share tagged pointer code instead of duplicating the required arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ObjCLanguageRuntime.cpp b/source/Target/ObjCLanguageRuntime.cpp
index 87dfc79..7e66856 100644
--- a/source/Target/ObjCLanguageRuntime.cpp
+++ b/source/Target/ObjCLanguageRuntime.cpp
@@ -92,6 +92,9 @@
             m_complete_class_cache.erase(name);
     }
     
+    if (m_negative_complete_class_cache.count(name) > 0)
+        return TypeSP();
+    
     const ModuleList &modules = m_process->GetTarget().GetImages();
 
     SymbolContextList sc_list;
@@ -139,6 +142,7 @@
             }
         }
     }
+    m_negative_complete_class_cache.insert(name);
     return TypeSP();
 }