[Lldb-commits] [lldb] r136920 - in /lldb/trunk: include/lldb/Symbol/ClangASTContext.h source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp source/Symbol/ClangASTContext.cpp

Greg Clayton gclayton at apple.com
Thu Aug 4 14:02:57 PDT 2011


Author: gclayton
Date: Thu Aug  4 16:02:57 2011
New Revision: 136920

URL: http://llvm.org/viewvc/llvm-project?rev=136920&view=rev
Log:
Make sure we track CXX and objc method decls.


Modified:
    lldb/trunk/include/lldb/Symbol/ClangASTContext.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=136920&r1=136919&r2=136920&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Aug  4 16:02:57 2011
@@ -300,6 +300,13 @@
                                                           is_explicit);
     }
     
+    static clang::DeclContext *
+    GetAsDeclContext (clang::CXXMethodDecl *cxx_method_decl);
+
+    static clang::DeclContext *
+    GetAsDeclContext (clang::ObjCMethodDecl *objc_method_decl);
+
+    
     static bool
     CheckOverloadedOperatorKindParameterCount (uint32_t op_kind, 
                                                uint32_t num_params);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=136920&r1=136919&r2=136920&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Aug  4 16:02:57 2011
@@ -3645,6 +3645,7 @@
                                                                                       type_name_cstr,
                                                                                       clang_type,
                                                                                       accessibility);
+                                    LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(objc_method_decl), die);
                                     type_handled = objc_method_decl != NULL;
                                 }
                             }
@@ -3683,6 +3684,8 @@
                                                                                             is_static,
                                                                                             is_inline,
                                                                                             is_explicit);
+                                            LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(cxx_method_decl), die);
+
                                             type_handled = cxx_method_decl != NULL;
                                         }
                                     }

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=136920&r1=136919&r2=136920&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Aug  4 16:02:57 2011
@@ -4912,3 +4912,15 @@
     }
 }
 
+clang::DeclContext *
+ClangASTContext::GetAsDeclContext (clang::CXXMethodDecl *cxx_method_decl)
+{
+    return clang::dyn_cast<clang::DeclContext>(cxx_method_decl);
+}
+
+clang::DeclContext *
+ClangASTContext::GetAsDeclContext (clang::ObjCMethodDecl *objc_method_decl)
+{
+    return clang::dyn_cast<clang::DeclContext>(objc_method_decl);
+}
+





More information about the lldb-commits mailing list