diff options
author | Alex Langford <apl@fb.com> | 2020-01-27 17:59:12 -0800 |
---|---|---|
committer | Alex Langford <apl@fb.com> | 2020-01-28 14:11:53 -0800 |
commit | 5eaf44f99f0a0a3bdfa892892b8aaca841c8dbe0 (patch) | |
tree | b7ac1bd4d12f34b13f90cd9761f59c89e5da261d /lldb/source | |
parent | 1f85dfb2af1af502a83d561039fee55184115875 (diff) | |
download | llvm-5eaf44f99f0a0a3bdfa892892b8aaca841c8dbe0.zip llvm-5eaf44f99f0a0a3bdfa892892b8aaca841c8dbe0.tar.gz llvm-5eaf44f99f0a0a3bdfa892892b8aaca841c8dbe0.tar.bz2 |
[lldb] Delete ValueObject::GetBaseClassPath
Summary:
This method has exactly one call site, which is only actually executed
if `ValueObject::IsBaseClass` returns false. However, the first thing
that `ValueObject::GetBaseClassPath` does is check if `ValueObject::IsBaseClass`
is true. Because this can never be the case, this method always returns false
and is therefore effectively dead.
Differential Revision: https://reviews.llvm.org/D73517
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 3a0aecf..f6e7dcc 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -2013,23 +2013,6 @@ bool ValueObject::HasSyntheticValue() { return m_synthetic_value != nullptr; } -bool ValueObject::GetBaseClassPath(Stream &s) { - if (IsBaseClass()) { - bool parent_had_base_class = - GetParent() && GetParent()->GetBaseClassPath(s); - CompilerType compiler_type = GetCompilerType(); - llvm::Optional<std::string> cxx_class_name = - TypeSystemClang::GetCXXClassName(compiler_type); - if (cxx_class_name) { - if (parent_had_base_class) - s.PutCString("::"); - s.PutCString(cxx_class_name.getValue()); - } - return parent_had_base_class || cxx_class_name; - } - return false; -} - ValueObject *ValueObject::GetNonBaseClassParent() { if (GetParent()) { if (GetParent()->IsBaseClass()) @@ -2139,13 +2122,8 @@ void ValueObject::GetExpressionPath(Stream &s, bool qualify_cxx_base_classes, } const char *name = GetName().GetCString(); - if (name) { - if (qualify_cxx_base_classes) { - if (GetBaseClassPath(s)) - s.PutCString("::"); - } + if (name) s.PutCString(name); - } } } |