summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-08 02:42:06 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-08 02:42:06 +0000
commit1bbcc03455790f26d46c4db63a4de2b00277cf69 (patch)
tree63a3dcb107afbf59dcdd6774009a700ff310f0f2
parent503c83ad819a8d396448a5243ee0637bc56343ad (diff)
downloadbcm5719-llvm-1bbcc03455790f26d46c4db63a4de2b00277cf69.tar.gz
bcm5719-llvm-1bbcc03455790f26d46c4db63a4de2b00277cf69.zip
<rdar://problem/13374267>
Fixed error where objective C methods with selectors names starting with ".cxx_" where causing errors for ARC built binaries. llvm-svn: 176683
-rw-r--r--lldb/include/lldb/Symbol/ClangASTContext.h8
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp3
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp18
3 files changed, 14 insertions, 15 deletions
diff --git a/lldb/include/lldb/Symbol/ClangASTContext.h b/lldb/include/lldb/Symbol/ClangASTContext.h
index f2f6a989f3a..7a6d460b751 100644
--- a/lldb/include/lldb/Symbol/ClangASTContext.h
+++ b/lldb/include/lldb/Symbol/ClangASTContext.h
@@ -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
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 94cc8385ac8..ba286997dd2 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -6332,7 +6332,8 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
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)
{
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 30fa9bbc4e6..729d1874da4 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -2644,14 +2644,12 @@ ClangASTContext::ObjCDeclHasIVars (ObjCInterfaceDecl *class_interface_decl, bool
}
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::AddMethodToObjCObjectType
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::AddMethodToObjCObjectType
name[0] == '-',
is_variadic,
is_synthesized,
- true, // is_implicitly_declared
+ is_artificial, // is_implicitly_declared
is_defined,
imp_control,
false /*has_related_result_type*/);
OpenPOWER on IntegriCloud