[Lldb-commits] [lldb] r117430 - in /lldb/trunk/source/Symbol: SymbolContext.cpp Type.cpp

Sean Callanan scallanan at apple.com
Tue Oct 26 18:36:51 PDT 2010


Author: spyffe
Date: Tue Oct 26 20:36:51 2010
New Revision: 117430

URL: http://llvm.org/viewvc/llvm-project?rev=117430&view=rev
Log:
Removed an inappropriate function lookup path.

Also made type lookup lazy for types that are
hidden behind pointers.

Modified:
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Symbol/Type.cpp

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=117430&r1=117429&r2=117430&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Tue Oct 26 20:36:51 2010
@@ -413,26 +413,6 @@
         // for methods matching name.
     }
 
-    if (comp_unit != NULL)
-    {
-        // Make sure we've read in all the functions.  We should be able to check and see
-        // if there's one by this name present before we do this...
-        module_sp->GetSymbolVendor()->ParseCompileUnitFunctions(*this);
-        uint32_t func_idx;
-        lldb::FunctionSP func_sp;
-        for (func_idx = 0; (func_sp = comp_unit->GetFunctionAtIndex(func_idx)) != NULL; ++func_idx)
-        {
-            if (func_sp->GetMangled().GetName() == name)
-            {
-                SymbolContext sym_ctx(target_sp,
-                                      module_sp,
-                                      comp_unit,
-                                      func_sp.get());
-                sc_list.Append(sym_ctx);
-            }
-        }
-    }
-    
     if (module_sp != NULL)
         module_sp->FindFunctions (name, eFunctionNameTypeBase | eFunctionNameTypeFull, true, sc_list);
 

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=117430&r1=117429&r2=117430&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Tue Oct 26 20:36:51 2010
@@ -428,7 +428,6 @@
     {
         TypeList *type_list = GetTypeList();
         Type *encoding_type = GetEncodingType();
-
         if (encoding_type)
         {
             switch (m_encoding_uid_type)
@@ -542,7 +541,19 @@
             Type *encoding_type = GetEncodingType ();
             if (encoding_type != NULL)
             {
-                if (encoding_type->ResolveClangType (forward_decl_is_ok))
+                bool forward_decl_is_ok_for_encoding = forward_decl_is_ok;
+                switch (m_encoding_uid_type)
+                {
+                case eEncodingIsPointerUID:
+                case eEncodingIsLValueReferenceUID:
+                case eEncodingIsRValueReferenceUID:
+                    forward_decl_is_ok_for_encoding = true;
+                    break;
+                default:
+                    break;
+                }
+                
+                if (encoding_type->ResolveClangType (forward_decl_is_ok_for_encoding))
                 {
                     // We have at least resolve the forward declaration for our
                     // encoding type...
@@ -550,7 +561,7 @@
                 
                     // Check if we fully resolved our encoding type, and if so
                     // mark it as having been completely resolved.
-                    if (forward_decl_is_ok == false)
+                    if (forward_decl_is_ok_for_encoding == false)
                         m_encoding_type_decl_resolved = true;
                 }
             }





More information about the lldb-commits mailing list