diff options
author | Davide Italiano <davide@freebsd.org> | 2019-08-06 00:01:52 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2019-08-06 00:01:52 +0000 |
commit | b31f60b9c2e7cc452d9600e1014d42822a2cd7c6 (patch) | |
tree | b642fd516bb7a6763b135f55e5dfdcd17a997c86 | |
parent | 9bb525adb228a82b9e07e422e06d548dca60505e (diff) | |
download | bcm5719-llvm-b31f60b9c2e7cc452d9600e1014d42822a2cd7c6.tar.gz bcm5719-llvm-b31f60b9c2e7cc452d9600e1014d42822a2cd7c6.zip |
[CompilerType] Simplify the interface a bit more..
Summary:
.. removing IsMeaninglessWithoutTypeResolution(). I'm fairly
confident this was introduced to support swift, where
static types [without dynamic counterpart] don't carry a lot
of value. Since then, the formatters and dynamic type resolution
has been rewritten, and we employ different solutions. This function
is unused here too, so let's get read of it.
<rdar://problem/36377967>
Reviewers: shafik, JDevlieghere, alex, compnerd, teemperor
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D65782
llvm-svn: 367957
-rw-r--r-- | lldb/include/lldb/Symbol/CompilerType.h | 2 | ||||
-rw-r--r-- | lldb/include/lldb/Symbol/TypeSystem.h | 14 | ||||
-rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 20 | ||||
-rw-r--r-- | lldb/source/Symbol/CompilerType.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Symbol/TypeSystem.cpp | 4 |
5 files changed, 8 insertions, 38 deletions
diff --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h index 62ceb1059e0..c94e3d6220d 100644 --- a/lldb/include/lldb/Symbol/CompilerType.h +++ b/lldb/include/lldb/Symbol/CompilerType.h @@ -334,8 +334,6 @@ public: LazyBool ShouldPrintAsOneLiner(ValueObject *valobj) const; - bool IsMeaninglessWithoutDynamicResolution() const; - // Dumping types #ifndef NDEBUG diff --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h index 347d1f8f390..cb4d67ac8ee 100644 --- a/lldb/include/lldb/Symbol/TypeSystem.h +++ b/lldb/include/lldb/Symbol/TypeSystem.h @@ -454,20 +454,6 @@ public: virtual LazyBool ShouldPrintAsOneLiner(void *type, ValueObject *valobj); - // Type systems can have types that are placeholder types, which are meant to - // indicate the presence of a type, but offer no actual information about - // said types, and leave the burden of actually figuring type information out - // to dynamic type resolution. For instance a language with a generics - // system, can use placeholder types to indicate "type argument goes here", - // without promising uniqueness of the placeholder, nor attaching any - // actually idenfiable information to said placeholder. This API allows type - // systems to tell LLDB when such a type has been encountered In response, - // the debugger can react by not using this type as a cache entry in any - // type-specific way For instance, LLDB will currently not cache any - // formatters that are discovered on such a type as attributable to the - // meaningless type itself, instead preferring to use the dynamic type - virtual bool IsMeaninglessWithoutDynamicResolution(void *type); - protected: const LLVMCastKind m_kind; // Support for llvm casting SymbolFile *m_sym_file; diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp index e218687c3e4..5289176ac18 100644 --- a/lldb/source/DataFormatters/FormatManager.cpp +++ b/lldb/source/DataFormatters/FormatManager.cpp @@ -183,15 +183,13 @@ void FormatManager::GetPossibleMatches( reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField; } - if (!compiler_type.IsMeaninglessWithoutDynamicResolution()) { - entries.push_back( - {type_name, reason, did_strip_ptr, did_strip_ref, did_strip_typedef}); + entries.push_back( + {type_name, reason, did_strip_ptr, did_strip_ref, did_strip_typedef}); - ConstString display_type_name(compiler_type.GetDisplayTypeName()); - if (display_type_name != type_name) - entries.push_back({display_type_name, reason, did_strip_ptr, - did_strip_ref, did_strip_typedef}); - } + ConstString display_type_name(compiler_type.GetDisplayTypeName()); + if (display_type_name != type_name) + entries.push_back({display_type_name, reason, did_strip_ptr, did_strip_ref, + did_strip_typedef}); for (bool is_rvalue_ref = true, j = true; j && compiler_type.IsReferenceType(nullptr, &is_rvalue_ref); j = false) { @@ -565,10 +563,8 @@ ConstString FormatManager::GetTypeForCache(ValueObject &valobj, lldb::DynamicValueType use_dynamic) { ValueObjectSP valobj_sp = valobj.GetQualifiedRepresentationIfAvailable( use_dynamic, valobj.IsSynthetic()); - if (valobj_sp && valobj_sp->GetCompilerType().IsValid()) { - if (!valobj_sp->GetCompilerType().IsMeaninglessWithoutDynamicResolution()) - return valobj_sp->GetQualifiedTypeName(); - } + if (valobj_sp && valobj_sp->GetCompilerType().IsValid()) + return valobj_sp->GetQualifiedTypeName(); return ConstString(); } diff --git a/lldb/source/Symbol/CompilerType.cpp b/lldb/source/Symbol/CompilerType.cpp index b12c89e749a..69a422b77ef 100644 --- a/lldb/source/Symbol/CompilerType.cpp +++ b/lldb/source/Symbol/CompilerType.cpp @@ -709,12 +709,6 @@ LazyBool CompilerType::ShouldPrintAsOneLiner(ValueObject *valobj) const { return eLazyBoolCalculate; } -bool CompilerType::IsMeaninglessWithoutDynamicResolution() const { - if (IsValid()) - return m_type_system->IsMeaninglessWithoutDynamicResolution(m_type); - return false; -} - // Get the index of the child of "clang_type" whose name matches. This function // doesn't descend into the children, but only looks one level deep and name // matches can include base class names. diff --git a/lldb/source/Symbol/TypeSystem.cpp b/lldb/source/Symbol/TypeSystem.cpp index e5fd7e52980..e9dcdfd7a53 100644 --- a/lldb/source/Symbol/TypeSystem.cpp +++ b/lldb/source/Symbol/TypeSystem.cpp @@ -125,10 +125,6 @@ LazyBool TypeSystem::ShouldPrintAsOneLiner(void *type, ValueObject *valobj) { return eLazyBoolCalculate; } -bool TypeSystem::IsMeaninglessWithoutDynamicResolution(void *type) { - return false; -} - ConstString TypeSystem::DeclGetMangledName(void *opaque_decl) { return ConstString(); } |