[Lldb-commits] [lldb] r143094 - /lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp

Sean Callanan scallanan at apple.com
Wed Oct 26 19:06:03 PDT 2011


Author: spyffe
Date: Wed Oct 26 21:06:03 2011
New Revision: 143094

URL: http://llvm.org/viewvc/llvm-project?rev=143094&view=rev
Log:
Disabled lookups for the Objective-C builtin type "id;"
the compiler should pick this type up automatically.

Modified:
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=143094&r1=143093&r2=143094&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Wed Oct 26 21:06:03 2011
@@ -2642,34 +2642,39 @@
                 }
             }
         }
-    }    
-    
-    TypeList types;
-    SymbolContext null_sc;
+    }
     
-    if (module_sp && namespace_decl)
-        module_sp->FindTypes(null_sc, name, &namespace_decl, true, 1, types);
-    else
-        target->GetImages().FindTypes (null_sc, name, true, 1, types);
+    static ConstString id_name("id");
     
-    if (types.GetSize())
+    if (name != id_name)
     {
-        TypeSP type_sp = types.GetTypeAtIndex(0);
+        TypeList types;
+        SymbolContext null_sc;
         
-        if (log)
+        if (module_sp && namespace_decl)
+            module_sp->FindTypes(null_sc, name, &namespace_decl, true, 1, types);
+        else
+            target->GetImages().FindTypes (null_sc, name, true, 1, types);
+        
+        if (types.GetSize())
         {
-            const char *name_string = type_sp->GetName().GetCString();
+            TypeSP type_sp = types.GetTypeAtIndex(0);
             
-            log->Printf("  FEVD[%u] Matching type found for \"%s\": %s", 
-                        current_id, 
-                        name.GetCString(), 
-                        (name_string ? name_string : "<anonymous>"));
-        }
+            if (log)
+            {
+                const char *name_string = type_sp->GetName().GetCString();
+                
+                log->Printf("  FEVD[%u] Matching type found for \"%s\": %s", 
+                            current_id, 
+                            name.GetCString(), 
+                            (name_string ? name_string : "<anonymous>"));
+            }
 
-        TypeFromUser user_type(type_sp->GetClangFullType(),
-                               type_sp->GetClangAST());
-            
-        AddOneType(context, user_type, current_id, false);
+            TypeFromUser user_type(type_sp->GetClangFullType(),
+                                   type_sp->GetClangAST());
+                
+            AddOneType(context, user_type, current_id, false);
+        }
     }
 }
 





More information about the lldb-commits mailing list