diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 16 |
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) |

