[Lldb-commits] [lldb] r176683 - <rdar://problem/13374267>

Greg Clayton gclayton at apple.com
Thu Mar 7 18:42:07 PST 2013


Author: gclayton
Date: Thu Mar  7 20:42:06 2013
New Revision: 176683

URL: http://llvm.org/viewvc/llvm-project?rev=176683&view=rev
Log:
<rdar://problem/13374267>

Fixed error where objective C methods with selectors names starting with ".cxx_" where causing errors for ARC built binaries.


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=176683&r1=176682&r2=176683&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Mar  7 20:42:06 2013
@@ -546,19 +546,21 @@ public:
                                lldb::clang_type_t class_opaque_type, 
                                const char *name,  // the full symbol name as seen in the symbol table ("-[NString stringWithCString:]")
                                lldb::clang_type_t method_opaque_type,
-                               lldb::AccessType access);
+                               lldb::AccessType access,
+                               bool is_artificial);
 
     clang::ObjCMethodDecl *
     AddMethodToObjCObjectType (lldb::clang_type_t class_opaque_type, 
                                const char *name,  // the full symbol name as seen in the symbol table ("-[NString stringWithCString:]")
                                lldb::clang_type_t method_opaque_type,
-                               lldb::AccessType access)
+                               lldb::AccessType access,
+                               bool is_artificial)
     {
         return AddMethodToObjCObjectType (getASTContext(),
                                           class_opaque_type,
                                           name,
                                           method_opaque_type,
-                                          access);
+                                          access, is_artificial);
     }
 
     static bool

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=176683&r1=176682&r2=176683&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Mar  7 20:42:06 2013
@@ -6332,7 +6332,8 @@ SymbolFileDWARF::ParseType (const Symbol
                                     clang::ObjCMethodDecl *objc_method_decl = ast.AddMethodToObjCObjectType (class_opaque_type, 
                                                                                                              type_name_cstr,
                                                                                                              clang_type,
-                                                                                                             accessibility);
+                                                                                                             accessibility,
+                                                                                                             is_artificial);
                                     type_handled = objc_method_decl != NULL;
                                     if (type_handled)
                                     {

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=176683&r1=176682&r2=176683&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Mar  7 20:42:06 2013
@@ -2644,14 +2644,12 @@ ClangASTContext::ObjCDeclHasIVars (ObjCI
 }
 
 ObjCMethodDecl *
-ClangASTContext::AddMethodToObjCObjectType
-(
-    ASTContext *ast,
-    clang_type_t class_opaque_type, 
-    const char *name,  // the full symbol name as seen in the symbol table ("-[NString stringWithCString:]")
-    clang_type_t method_opaque_type,
-    lldb::AccessType access
-)
+ClangASTContext::AddMethodToObjCObjectType (ASTContext *ast,
+                                            clang_type_t class_opaque_type,
+                                            const char *name,  // the full symbol name as seen in the symbol table ("-[NString stringWithCString:]")
+                                            clang_type_t method_opaque_type,
+                                            lldb::AccessType access,
+                                            bool is_artificial)
 {
     if (class_opaque_type == NULL || method_opaque_type == NULL)
         return NULL;
@@ -2682,8 +2680,6 @@ ClangASTContext::AddMethodToObjCObjectTy
         return NULL;
     
     selector_start++;
-    if (!(::isalpha (selector_start[0]) || selector_start[0] == '_'))
-        return NULL;
     llvm::SmallVector<IdentifierInfo *, 12> selector_idents;
 
     size_t len = 0;
@@ -2745,7 +2741,7 @@ ClangASTContext::AddMethodToObjCObjectTy
                                                                name[0] == '-',
                                                                is_variadic,
                                                                is_synthesized,
-                                                               true, // is_implicitly_declared
+                                                               is_artificial, // is_implicitly_declared
                                                                is_defined,
                                                                imp_control,
                                                                false /*has_related_result_type*/);





More information about the lldb-commits mailing list