Added a new class called lldb_private::SymbolFileType which is designed to
take a SymbolFile reference and a lldb::user_id_t and be used in objects
which represent things in debug symbols that have types where we don't need
to know the true type yet, such as in lldb_private::Variable objects. This
allows us to defer resolving the type until something is used. More specifically
this allows us to get 1000 local variables from the current function, and if
the user types "frame variable argc", we end up _only_ resolving the type for
"argc" and not for the 999 other local variables. We can expand the use of this
as needed in the future.

Modified the DWARFMappedHash class to be able to read the HashData that has
more than just the DIE offset. It currently will read the atoms in the header
definition and read the data correctly. Currently only the DIE offset and 
type flags are supported. This is needed for adding type flags to the 
.apple_types hash accelerator tables.

Fixed a assertion crash that would happen if we have a variable that had a
DW_AT_const_value instead of a location where "location.LocationContains_DW_OP_addr()"
would end up asserting when it tried to parse the variable location as a
DWARF opcode list.

Decreased the amount of memory that LLDB would use when evaluating an expression
by 3x - 4x for clang. There was a place in the namespace lookup code that was
parsing all namespaces with a certain name in a DWARF file instead of stopping
when it found the first match. This was causing all of the compile units with
a matching namespace to get parsed into memory and causing unnecessary memory
bloat. 

Improved "Target::EvaluateExpression(...)" to not try and find a variable
when the expression contains characters that would certainly cause an expression
to need to be evaluated by the debugger. 



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146130 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 014f980..44bab7b 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -1524,47 +1524,35 @@
 {
     if (module && name_cstr && name_cstr[0])
     {
-        /*SymbolContextList sc_list;
-        
-        SymbolVendor *symbol_vendor = module->GetSymbolVendor();
-        if (symbol_vendor)
-        {*/
-            TypeList type_list;
-            uint32_t num_matches = 0;
-            SymbolContext sc;
-            //            if (name_is_regex)
-            //            {
-            //                RegularExpression name_regex (name_cstr);
-            //                num_matches = symbol_vendor->FindFunctions(sc, name_regex, true, UINT32_MAX, type_list);
-            //            }
-            //            else
-            //            {
-            ConstString name(name_cstr);
-            num_matches = module->FindTypes(sc, name, NULL, true, UINT32_MAX, type_list);
-            //            }
+        TypeList type_list;
+        const uint32_t max_num_matches = 1;
+        uint32_t num_matches = 0;
+        SymbolContext sc;
+
+        ConstString name(name_cstr);
+        num_matches = module->FindTypes(sc, name, NULL, true, max_num_matches, type_list);
             
-            if (num_matches)
+        if (num_matches)
+        {
+            strm.Indent ();
+            strm.Printf("%u match%s found in ", num_matches, num_matches > 1 ? "es" : "");
+            DumpFullpath (strm, &module->GetFileSpec(), 0);
+            strm.PutCString(":\n");
+            const uint32_t num_types = type_list.GetSize();
+            for (uint32_t i=0; i<num_types; ++i)
             {
-                strm.Indent ();
-                strm.Printf("%u match%s found in ", num_matches, num_matches > 1 ? "es" : "");
-                DumpFullpath (strm, &module->GetFileSpec(), 0);
-                strm.PutCString(":\n");
-                const uint32_t num_types = type_list.GetSize();
-                for (uint32_t i=0; i<num_types; ++i)
+                TypeSP type_sp (type_list.GetTypeAtIndex(i));
+                if (type_sp)
                 {
-                    TypeSP type_sp (type_list.GetTypeAtIndex(i));
-                    if (type_sp)
-                    {
-                        // Resolve the clang type so that any forward references
-                        // to types that haven't yet been parsed will get parsed.
-                        type_sp->GetClangFullType ();
-                        type_sp->GetDescription (&strm, eDescriptionLevelFull, true);
-                    }
-                    strm.EOL();
+                    // Resolve the clang type so that any forward references
+                    // to types that haven't yet been parsed will get parsed.
+                    type_sp->GetClangFullType ();
+                    type_sp->GetDescription (&strm, eDescriptionLevelFull, true);
                 }
+                strm.EOL();
             }
-            return num_matches;
-        //}
+        }
+        return num_matches;
     }
     return 0;
 }