forked from OSchip/llvm-project
[Symbol] Fix some botched logic in Variable::GetLanguage
Summary: I messed up the logic for this. Fixing with some improvements suggested by Pavel. Reviewers: labath, jdoerfert Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D65165 llvm-svn: 366950
This commit is contained in:
parent
86e9f9dc26
commit
eb6782758a
|
@ -59,12 +59,12 @@ lldb::LanguageType Variable::GetLanguage() const {
|
|||
return lang;
|
||||
|
||||
if (auto *func = m_owner_scope->CalculateSymbolContextFunction()) {
|
||||
if ((lang = func->GetLanguage()) && lang != lldb::eLanguageTypeUnknown)
|
||||
if ((lang = func->GetLanguage()) != lldb::eLanguageTypeUnknown)
|
||||
return lang;
|
||||
} else if (auto *comp_unit =
|
||||
m_owner_scope->CalculateSymbolContextCompileUnit()) {
|
||||
if ((lang = comp_unit->GetLanguage()) != lldb::eLanguageTypeUnknown)
|
||||
return lang;
|
||||
else if (auto *comp_unit =
|
||||
m_owner_scope->CalculateSymbolContextCompileUnit())
|
||||
if ((lang = func->GetLanguage()) && lang != lldb::eLanguageTypeUnknown)
|
||||
return lang;
|
||||
}
|
||||
|
||||
return lldb::eLanguageTypeUnknown;
|
||||
|
|
Loading…
Reference in New Issue