[Lldb-commits] [lldb] r366950 - [Symbol] Fix some botched logic in Variable::GetLanguage
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 24 15:12:02 PDT 2019
Author: xiaobai
Date: Wed Jul 24 15:12:02 2019
New Revision: 366950
URL: http://llvm.org/viewvc/llvm-project?rev=366950&view=rev
Log:
[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
Modified:
lldb/trunk/source/Symbol/Variable.cpp
Modified: lldb/trunk/source/Symbol/Variable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Variable.cpp?rev=366950&r1=366949&r2=366950&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Variable.cpp (original)
+++ lldb/trunk/source/Symbol/Variable.cpp Wed Jul 24 15:12:02 2019
@@ -59,12 +59,12 @@ lldb::LanguageType Variable::GetLanguage
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;
More information about the lldb-commits
mailing list