diff options
author | Alex Langford <apl@fb.com> | 2019-07-22 20:14:18 +0000 |
---|---|---|
committer | Alex Langford <apl@fb.com> | 2019-07-22 20:14:18 +0000 |
commit | 4de5d9d61213d2b69557cb969862412d743114f7 (patch) | |
tree | ded80fee7ba3fa1c58006c420730c7ef68b7a2b9 /lldb/source/Core/ValueObject.cpp | |
parent | 510e6fadaae95a41bee0eb99d84a146efc612365 (diff) | |
download | bcm5719-llvm-4de5d9d61213d2b69557cb969862412d743114f7.tar.gz bcm5719-llvm-4de5d9d61213d2b69557cb969862412d743114f7.zip |
[Symbol] Improve Variable::GetLanguage
Summary:
When trying to ascertain what language a variable belongs to, just
checking the compilation unit is often not enough. In r364845 I added a way to
check for a variable's language type, but didn't put it in Variable itself.
Let's go ahead and put it in Variable.
Reviewers: jingham, clayborg
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D64042
llvm-svn: 366733
Diffstat (limited to 'lldb/source/Core/ValueObject.cpp')
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 297365b4ecb..57bc8aebc8b 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -1672,16 +1672,7 @@ bool ValueObject::IsRuntimeSupportValue() { if (!GetVariable() || !GetVariable()->IsArtificial()) return false; - LanguageType lang = eLanguageTypeUnknown; - if (auto *sym_ctx_scope = GetSymbolContextScope()) { - if (auto *func = sym_ctx_scope->CalculateSymbolContextFunction()) - lang = func->GetLanguage(); - else if (auto *comp_unit = - sym_ctx_scope->CalculateSymbolContextCompileUnit()) - lang = comp_unit->GetLanguage(); - } - - if (auto *runtime = process->GetLanguageRuntime(lang)) + if (auto *runtime = process->GetLanguageRuntime(GetVariable()->GetLanguage())) if (runtime->IsWhitelistedRuntimeValue(GetName())) return false; |