Fixed a problem where LLDB inserted regular C
FunctionDecls into classes if it looked up a method in a different DWARF context than the one where it found the parent class's definition. The symptom of this was, for a method A::B(), 1) LLDB finds A in context 1, creating a CXXRecordDecl for A and marking it as needing completion 2) LLDB looks up B in context 2, finds that its parent A already has a CXXRecordDecl, but can't find a CXXMethodDecl for B 3) Not finding a CXXMethodDecl for B, LLDB doesn't set the flag indicating that B was resolved 4) Because the flag wasn't set, LLDB's fallthrough code creates a FunctionDecl for B and sticks it in the DeclContext -- in this case, A. 5) Clang crashes on finding a FunctionDecl inside a CXXRecordDecl. llvm-svn: 154627
This commit is contained in:
parent
9455da0ea9
commit
02eee4d4f7
|
|
@ -5659,6 +5659,11 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
|
|||
type_sp = type_ptr->shared_from_this();
|
||||
break;
|
||||
}
|
||||
|
||||
// FIXME This is fixing some even uglier behavior but we really need to
|
||||
// uniq the methods of each class as well as the class itself.
|
||||
// <rdar://problem/11240464>
|
||||
type_handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue