Teach SBFrame how to guess its language.

<rdar://problem/31411646>

llvm-svn: 300012
This commit is contained in:
Jim Ingham
2017-04-12 00:19:54 +00:00
parent a76349bffe
commit bdbdd22937
12 changed files with 181 additions and 3 deletions

View File

@@ -1212,9 +1212,14 @@ lldb::LanguageType StackFrame::GuessLanguage() {
LanguageType lang_type = GetLanguage();
if (lang_type == eLanguageTypeUnknown) {
Function *f = GetSymbolContext(eSymbolContextFunction).function;
if (f) {
lang_type = f->GetMangled().GuessLanguage();
SymbolContext sc = GetSymbolContext(eSymbolContextFunction
| eSymbolContextSymbol);
if (sc.function) {
lang_type = sc.function->GetMangled().GuessLanguage();
}
else if (sc.symbol)
{
lang_type = sc.symbol->GetMangled().GuessLanguage();
}
}