summaryrefslogtreecommitdiff
path: root/lldb/source/DataFormatters/FormatManager.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/DataFormatters/FormatManager.cpp
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'lldb/source/DataFormatters/FormatManager.cpp')
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index d5db3ee75bf3..ad02d37360b8 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -1,4 +1,4 @@
-//===-- FormatManager.cpp ----------------------------------------*- C++-*-===//
+//===-- FormatManager.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -174,28 +174,27 @@ void FormatManager::DisableAllCategories() {
}
void FormatManager::GetPossibleMatches(
- ValueObject &valobj, CompilerType compiler_type, uint32_t reason,
+ ValueObject &valobj, CompilerType compiler_type,
lldb::DynamicValueType use_dynamic, FormattersMatchVector &entries,
bool did_strip_ptr, bool did_strip_ref, bool did_strip_typedef,
bool root_level) {
compiler_type = compiler_type.GetTypeForFormatters();
- ConstString type_name(compiler_type.GetConstTypeName());
+ ConstString type_name(compiler_type.GetTypeName());
if (valobj.GetBitfieldBitSize() > 0) {
StreamString sstring;
sstring.Printf("%s:%d", type_name.AsCString(), valobj.GetBitfieldBitSize());
ConstString bitfieldname(sstring.GetString());
entries.push_back(
- {bitfieldname, 0, did_strip_ptr, did_strip_ref, did_strip_typedef});
- reason |= lldb_private::eFormatterChoiceCriterionStrippedBitField;
+ {bitfieldname, did_strip_ptr, did_strip_ref, did_strip_typedef});
}
if (!compiler_type.IsMeaninglessWithoutDynamicResolution()) {
entries.push_back(
- {type_name, reason, did_strip_ptr, did_strip_ref, did_strip_typedef});
+ {type_name, did_strip_ptr, did_strip_ref, did_strip_typedef});
- ConstString display_type_name(compiler_type.GetDisplayTypeName());
+ ConstString display_type_name(compiler_type.GetTypeName());
if (display_type_name != type_name)
- entries.push_back({display_type_name, reason, did_strip_ptr,
+ entries.push_back({display_type_name, did_strip_ptr,
did_strip_ref, did_strip_typedef});
}
@@ -204,8 +203,6 @@ void FormatManager::GetPossibleMatches(
CompilerType non_ref_type = compiler_type.GetNonReferenceType();
GetPossibleMatches(
valobj, non_ref_type,
- reason |
- lldb_private::eFormatterChoiceCriterionStrippedPointerReference,
use_dynamic, entries, did_strip_ptr, true, did_strip_typedef);
if (non_ref_type.IsTypedefType()) {
CompilerType deffed_referenced_type = non_ref_type.GetTypedefedType();
@@ -214,7 +211,6 @@ void FormatManager::GetPossibleMatches(
: deffed_referenced_type.GetLValueReferenceType();
GetPossibleMatches(
valobj, deffed_referenced_type,
- reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
use_dynamic, entries, did_strip_ptr, did_strip_ref,
true); // this is not exactly the usual meaning of stripping typedefs
}
@@ -224,8 +220,6 @@ void FormatManager::GetPossibleMatches(
CompilerType non_ptr_type = compiler_type.GetPointeeType();
GetPossibleMatches(
valobj, non_ptr_type,
- reason |
- lldb_private::eFormatterChoiceCriterionStrippedPointerReference,
use_dynamic, entries, true, did_strip_ref, did_strip_typedef);
if (non_ptr_type.IsTypedefType()) {
CompilerType deffed_pointed_type =
@@ -233,7 +227,6 @@ void FormatManager::GetPossibleMatches(
const bool stripped_typedef = true;
GetPossibleMatches(
valobj, deffed_pointed_type,
- reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
use_dynamic, entries, did_strip_ptr, did_strip_ref,
stripped_typedef); // this is not exactly the usual meaning of
// stripping typedefs
@@ -253,7 +246,6 @@ void FormatManager::GetPossibleMatches(
const bool stripped_typedef = true;
GetPossibleMatches(
valobj, deffed_array_type,
- reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
use_dynamic, entries, did_strip_ptr, did_strip_ref,
stripped_typedef); // this is not exactly the usual meaning of
// stripping typedefs
@@ -267,7 +259,6 @@ void FormatManager::GetPossibleMatches(
language->GetPossibleFormattersMatches(valobj, use_dynamic)) {
entries.push_back(
{candidate,
- reason | lldb_private::eFormatterChoiceCriterionLanguagePlugin,
did_strip_ptr, did_strip_ref, did_strip_typedef});
}
}
@@ -278,7 +269,6 @@ void FormatManager::GetPossibleMatches(
CompilerType deffed_type = compiler_type.GetTypedefedType();
GetPossibleMatches(
valobj, deffed_type,
- reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
use_dynamic, entries, did_strip_ptr, did_strip_ref, true);
}
@@ -293,7 +283,7 @@ void FormatManager::GetPossibleMatches(
break;
if (unqual_compiler_ast_type.GetOpaqueQualType() !=
compiler_type.GetOpaqueQualType())
- GetPossibleMatches(valobj, unqual_compiler_ast_type, reason,
+ GetPossibleMatches(valobj, unqual_compiler_ast_type,
use_dynamic, entries, did_strip_ptr, did_strip_ref,
did_strip_typedef);
} while (false);
@@ -304,7 +294,6 @@ void FormatManager::GetPossibleMatches(
if (static_value_sp)
GetPossibleMatches(
*static_value_sp.get(), static_value_sp->GetCompilerType(),
- reason | lldb_private::eFormatterChoiceCriterionWentToStaticValue,
use_dynamic, entries, did_strip_ptr, did_strip_ref,
did_strip_typedef, true);
}