Logging improvements for the Objective-C runtime.
authorSean Callanan <scallanan@apple.com>
Wed, 7 Nov 2012 01:27:50 +0000 (01:27 +0000)
committerSean Callanan <scallanan@apple.com>
Wed, 7 Nov 2012 01:27:50 +0000 (01:27 +0000)
Also fixed a bug where the Objective-C runtime
would not properly report that it found a class if
(a) it had to build the ObjCInterfaceDecl for the
class and (b) logging was enabled.

<rdar://problem/12641180>

llvm-svn: 167516

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeVendor.cpp

index 8aaa9e4..1ab1063 100644 (file)
@@ -524,6 +524,9 @@ AppleObjCTypeVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl)
         
         clang::ObjCMethodDecl *method_decl = method_type.BuildMethod (interface_decl, name, true);
         
+        if (log)
+            log->Printf("[  AOTV::FD] Instance method [%s] [%s]", name, types);
+        
         if (method_decl)
             interface_decl->addDecl(method_decl);
     };
@@ -534,10 +537,21 @@ AppleObjCTypeVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl)
         
         clang::ObjCMethodDecl *method_decl = method_type.BuildMethod (interface_decl, name, false);
         
+        if (log)
+            log->Printf("[  AOTV::FD] Class method [%s] [%s]", name, types);
+        
         if (method_decl)
             interface_decl->addDecl(method_decl);
     };
     
+    if (log)
+    {
+        ASTDumper method_dumper ((clang::Decl*)interface_decl);
+        
+        log->Printf("[AppleObjCTypeVendor::FinishDecl] Finishing Objective-C interface for %s", descriptor->GetClassName().AsCString());
+    }
+    
+    
     if (!descriptor->Describe(superclass_func, instance_method_func, class_method_func))
         return false;
     
@@ -661,8 +675,6 @@ AppleObjCTypeVendor::FindTypes (const ConstString &name,
                         current_id,
                         dumper.GetCString(),
                         (uint64_t)isa);
-            
-            break;
         }
         
         types.push_back(ClangASTType(ast_ctx, new_iface_type.getAsOpaquePtr()));