summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-10-04 22:06:29 +0000
committerSean Callanan <scallanan@apple.com>2012-10-04 22:06:29 +0000
commit464a5b57f9c964ec0e4d7eac95f670890e8dc064 (patch)
tree72a1b711c0bb66b91c43e46c16a6a35e4b58d50d
parent476b9ee82b64f25c39b75936b7c321b1ae9ea3a8 (diff)
downloadbcm5719-llvm-464a5b57f9c964ec0e4d7eac95f670890e8dc064.tar.gz
bcm5719-llvm-464a5b57f9c964ec0e4d7eac95f670890e8dc064.zip
Fixed an assertion in the SymbolFile resulting
from a NULL ObjCInterfaceDecl. llvm-svn: 165261
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 144b8f97272..80c98b03f39 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -5916,14 +5916,16 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
if (accessibility == eAccessNone)
accessibility = eAccessPublic;
- clang::ObjCMethodDecl *objc_method_decl;
- objc_method_decl = ast.AddMethodToObjCObjectType (class_opaque_type,
- type_name_cstr,
- clang_type,
- accessibility);
- LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(objc_method_decl), die);
+ clang::ObjCMethodDecl *objc_method_decl = ast.AddMethodToObjCObjectType (class_opaque_type,
+ type_name_cstr,
+ clang_type,
+ accessibility);
type_handled = objc_method_decl != NULL;
- GetClangASTContext().SetMetadata((uintptr_t)objc_method_decl, MakeUserID(die->GetOffset()));
+ if (type_handled)
+ {
+ LinkDeclContextToDIE(ClangASTContext::GetAsDeclContext(objc_method_decl), die);
+ GetClangASTContext().SetMetadata((uintptr_t)objc_method_decl, MakeUserID(die->GetOffset()));
+ }
}
}
else if (is_cxx_method)
OpenPOWER on IntegriCloud