summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r--lldb/source/DataFormatters/CXXFunctionPointer.cpp2
-rw-r--r--lldb/source/DataFormatters/DataVisualization.cpp4
-rw-r--r--lldb/source/DataFormatters/DumpValueObjectOptions.cpp2
-rw-r--r--lldb/source/DataFormatters/FormatManager.cpp14
-rw-r--r--lldb/source/DataFormatters/StringPrinter.cpp2
-rw-r--r--lldb/source/DataFormatters/TypeCategory.cpp5
-rw-r--r--lldb/source/DataFormatters/TypeCategoryMap.cpp3
-rw-r--r--lldb/source/DataFormatters/TypeFormat.cpp2
-rw-r--r--lldb/source/DataFormatters/TypeSummary.cpp2
-rw-r--r--lldb/source/DataFormatters/ValueObjectPrinter.cpp12
10 files changed, 22 insertions, 26 deletions
diff --git a/lldb/source/DataFormatters/CXXFunctionPointer.cpp b/lldb/source/DataFormatters/CXXFunctionPointer.cpp
index fad67a9d5b7..9059891e5e9 100644
--- a/lldb/source/DataFormatters/CXXFunctionPointer.cpp
+++ b/lldb/source/DataFormatters/CXXFunctionPointer.cpp
@@ -38,7 +38,7 @@ bool lldb_private::formatters::CXXFunctionPointerSummaryProvider(
Address so_addr;
Target *target = exe_ctx.GetTargetPtr();
- if (target && target->GetSectionLoadList().IsEmpty() == false) {
+ if (target && !target->GetSectionLoadList().IsEmpty()) {
if (target->GetSectionLoadList().ResolveLoadAddress(func_ptr_address,
so_addr)) {
so_addr.Dump(&sstr, exe_ctx.GetBestExecutionContextScope(),
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index ee8e1e42c1c..23b8b6e128c 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -145,7 +145,7 @@ void DataVisualization::Categories::Enable(lldb::LanguageType lang_type) {
}
void DataVisualization::Categories::Disable(const ConstString &category) {
- if (GetFormatManager().GetCategory(category)->IsEnabled() == true)
+ if (GetFormatManager().GetCategory(category)->IsEnabled())
GetFormatManager().DisableCategory(category);
}
@@ -166,7 +166,7 @@ void DataVisualization::Categories::Enable(
void DataVisualization::Categories::Disable(
const lldb::TypeCategoryImplSP &category) {
- if (category.get() && category->IsEnabled() == true)
+ if (category.get() && category->IsEnabled())
GetFormatManager().DisableCategory(category);
}
diff --git a/lldb/source/DataFormatters/DumpValueObjectOptions.cpp b/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
index 6915196fea4..17f8d00ff49 100644
--- a/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
+++ b/lldb/source/DataFormatters/DumpValueObjectOptions.cpp
@@ -67,7 +67,7 @@ DumpValueObjectOptions &DumpValueObjectOptions::SetUseObjectiveC(bool use) {
}
DumpValueObjectOptions &DumpValueObjectOptions::SetShowSummary(bool show) {
- if (show == false)
+ if (!show)
SetOmitSummaryDepth(UINT32_MAX);
else
SetOmitSummaryDepth(0);
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp
index 82ad6e86eab..da03c64b0f8 100644
--- a/lldb/source/DataFormatters/FormatManager.cpp
+++ b/lldb/source/DataFormatters/FormatManager.cpp
@@ -293,7 +293,7 @@ FormatManager::GetFormatForType(lldb::TypeNameSpecifierImplSP type_sp) {
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeFormatImplSP format_current_sp =
category_sp->GetFormatForType(type_sp);
@@ -317,7 +317,7 @@ FormatManager::GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp) {
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeSummaryImplSP summary_current_sp =
category_sp->GetSummaryForType(type_sp);
@@ -341,7 +341,7 @@ FormatManager::GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp) {
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeFilterImplSP filter_current_sp(
(TypeFilterImpl *)category_sp->GetFilterForType(type_sp).get());
@@ -366,7 +366,7 @@ FormatManager::GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp) {
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::ScriptedSyntheticChildrenSP synth_current_sp(
(ScriptedSyntheticChildren *)category_sp->GetSyntheticForType(type_sp)
@@ -406,7 +406,7 @@ FormatManager::GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp) {
uint32_t prio_category = UINT32_MAX;
for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
category_sp = GetCategoryAtIndex(category_id);
- if (category_sp->IsEnabled() == false)
+ if (!category_sp->IsEnabled())
continue;
lldb::TypeValidatorImplSP validator_current_sp(
category_sp->GetValidatorForType(type_sp).get());
@@ -479,7 +479,7 @@ lldb::Format FormatManager::GetSingleItemFormat(lldb::Format vector_format) {
bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) {
// if settings say no oneline whatsoever
if (valobj.GetTargetSP().get() &&
- valobj.GetTargetSP()->GetDebugger().GetAutoOneLineSummaries() == false)
+ !valobj.GetTargetSP()->GetDebugger().GetAutoOneLineSummaries())
return false; // then don't oneline
// if this object has a summary, then ask the summary
@@ -535,7 +535,7 @@ bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) {
if (!synth_sp)
return false;
// but if we only have them to provide a value, keep going
- if (synth_sp->MightHaveChildren() == false &&
+ if (!synth_sp->MightHaveChildren() &&
synth_sp->DoesProvideSyntheticValue())
is_synth_val = true;
else
diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp
index 89d7a95069c..6a000f0f643 100644
--- a/lldb/source/DataFormatters/StringPrinter.cpp
+++ b/lldb/source/DataFormatters/StringPrinter.cpp
@@ -312,7 +312,7 @@ static bool DumpUTFBufferToStream(
utf8_data_end_ptr = utf8_data_ptr + utf8_data_buffer_sp->GetByteSize();
ConvertFunction(&data_ptr, data_end_ptr, &utf8_data_ptr,
utf8_data_end_ptr, llvm::lenientConversion);
- if (false == zero_is_terminator)
+ if (!zero_is_terminator)
utf8_data_end_ptr = utf8_data_ptr;
// needed because the ConvertFunction will change the value of the
// data_ptr.
diff --git a/lldb/source/DataFormatters/TypeCategory.cpp b/lldb/source/DataFormatters/TypeCategory.cpp
index 0f53f7643bb..5740a095f8b 100644
--- a/lldb/source/DataFormatters/TypeCategory.cpp
+++ b/lldb/source/DataFormatters/TypeCategory.cpp
@@ -157,10 +157,7 @@ bool TypeCategoryImpl::Get(ValueObject &valobj,
else /*if (filter_sp.get() && synth.get())*/
{
- if (filter_sp->GetRevision() > synth->GetRevision())
- pick_synth = false;
- else
- pick_synth = true;
+ pick_synth = filter_sp->GetRevision() <= synth->GetRevision();
}
if (pick_synth) {
if (regex_synth && reason)
diff --git a/lldb/source/DataFormatters/TypeCategoryMap.cpp b/lldb/source/DataFormatters/TypeCategoryMap.cpp
index 0cc57fe4043..3193f2703ef 100644
--- a/lldb/source/DataFormatters/TypeCategoryMap.cpp
+++ b/lldb/source/DataFormatters/TypeCategoryMap.cpp
@@ -118,8 +118,7 @@ void TypeCategoryMap::EnableAllCategories() {
void TypeCategoryMap::DisableAllCategories() {
std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
- Position p = First;
- for (; false == m_active_categories.empty(); p++) {
+ for (Position p = First; !m_active_categories.empty(); p++) {
m_active_categories.front()->SetEnabledPosition(p);
Disable(m_active_categories.front());
}
diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp
index 14ec1caa61b..1e8bc716204 100644
--- a/lldb/source/DataFormatters/TypeFormat.cpp
+++ b/lldb/source/DataFormatters/TypeFormat.cpp
@@ -178,7 +178,7 @@ bool TypeFormatImpl_EnumType::FormatObject(ValueObject *valobj,
}
} else
valobj_enum_type = iter->second;
- if (valobj_enum_type.IsValid() == false)
+ if (!valobj_enum_type.IsValid())
return false;
DataExtractor data;
Status error;
diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp
index 2f7e3a0ba71..492d3efc7f4 100644
--- a/lldb/source/DataFormatters/TypeSummary.cpp
+++ b/lldb/source/DataFormatters/TypeSummary.cpp
@@ -135,7 +135,7 @@ bool CXXFunctionSummaryFormat::FormatObject(ValueObject *valobj,
const TypeSummaryOptions &options) {
dest.clear();
StreamString stream;
- if (!m_impl || m_impl(*valobj, stream, options) == false)
+ if (!m_impl || !m_impl(*valobj, stream, options))
return false;
dest = stream.GetString();
return true;
diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
index 0792fdf3b32..082158822df 100644
--- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -129,13 +129,13 @@ bool ValueObjectPrinter::GetMostSpecializedValue() {
}
if (m_valobj->IsSynthetic()) {
- if (m_options.m_use_synthetic == false) {
+ if (!m_options.m_use_synthetic) {
ValueObject *non_synthetic = m_valobj->GetNonSyntheticValue().get();
if (non_synthetic)
m_valobj = non_synthetic;
}
} else {
- if (m_options.m_use_synthetic == true) {
+ if (m_options.m_use_synthetic) {
ValueObject *synthetic = m_valobj->GetSyntheticValue().get();
if (synthetic)
m_valobj = synthetic;
@@ -166,7 +166,7 @@ const char *ValueObjectPrinter::GetRootNameForDisplay(const char *if_fail) {
bool ValueObjectPrinter::ShouldPrintValueObject() {
if (m_should_print == eLazyBoolCalculate)
m_should_print =
- (m_options.m_flat_output == false || m_type_flags.Test(eTypeHasValue))
+ (!m_options.m_flat_output || m_type_flags.Test(eTypeHasValue))
? eLazyBoolYes
: eLazyBoolNo;
return m_should_print == eLazyBoolYes;
@@ -326,7 +326,7 @@ bool ValueObjectPrinter::CheckScopeIfNeeded() {
}
TypeSummaryImpl *ValueObjectPrinter::GetSummaryFormatter(bool null_if_omitted) {
- if (m_summary_formatter.second == false) {
+ if (!m_summary_formatter.second) {
TypeSummaryImpl *entry = m_options.m_summary_sp
? m_options.m_summary_sp.get()
: m_valobj->GetSummaryFormat().get();
@@ -458,7 +458,7 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed,
else
m_stream->Printf("%s\n", object_desc);
return true;
- } else if (value_printed == false && summary_printed == false)
+ } else if (!value_printed && !summary_printed)
return true;
else
return false;
@@ -625,7 +625,7 @@ bool ValueObjectPrinter::ShouldPrintEmptyBrackets(bool value_printed,
if (!IsAggregate())
return false;
- if (m_options.m_reveal_empty_aggregates == false) {
+ if (!m_options.m_reveal_empty_aggregates) {
if (value_printed || summary_printed)
return false;
}
OpenPOWER on IntegriCloud