aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp')
-rw-r--r--contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp56
1 files changed, 27 insertions, 29 deletions
diff --git a/contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp b/contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
index 69757c9844e1..b1075e9878d8 100644
--- a/contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
+++ b/contrib/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
@@ -180,7 +180,8 @@ TypeCategoryMap::GetFormat(FormattersMatchData &match_data) {
if (log) {
for (auto match : match_data.GetMatchesVector()) {
- log->Printf(
+ LLDB_LOGF(
+ log,
"[CategoryMap::GetFormat] candidate match = %s %s %s %s reason = "
"%" PRIu32,
match.GetTypeName().GetCString(),
@@ -194,18 +195,16 @@ TypeCategoryMap::GetFormat(FormattersMatchData &match_data) {
for (begin = m_active_categories.begin(); begin != end; begin++) {
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::TypeFormatImplSP current_format;
- if (log)
- log->Printf("[TypeCategoryMap::GetFormat] Trying to use category %s",
- category_sp->GetName());
+ LLDB_LOGF(log, "[TypeCategoryMap::GetFormat] Trying to use category %s",
+ category_sp->GetName());
if (!category_sp->Get(match_data.GetValueObject(),
match_data.GetMatchesVector(), current_format,
&reason_why))
continue;
return current_format;
}
- if (log)
- log->Printf(
- "[TypeCategoryMap::GetFormat] nothing found - returning empty SP");
+ LLDB_LOGF(log,
+ "[TypeCategoryMap::GetFormat] nothing found - returning empty SP");
return lldb::TypeFormatImplSP();
}
@@ -220,7 +219,8 @@ TypeCategoryMap::GetSummaryFormat(FormattersMatchData &match_data) {
if (log) {
for (auto match : match_data.GetMatchesVector()) {
- log->Printf(
+ LLDB_LOGF(
+ log,
"[CategoryMap::GetSummaryFormat] candidate match = %s %s %s %s "
"reason = %" PRIu32,
match.GetTypeName().GetCString(),
@@ -234,18 +234,17 @@ TypeCategoryMap::GetSummaryFormat(FormattersMatchData &match_data) {
for (begin = m_active_categories.begin(); begin != end; begin++) {
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::TypeSummaryImplSP current_format;
- if (log)
- log->Printf("[CategoryMap::GetSummaryFormat] Trying to use category %s",
- category_sp->GetName());
+ LLDB_LOGF(log, "[CategoryMap::GetSummaryFormat] Trying to use category %s",
+ category_sp->GetName());
if (!category_sp->Get(match_data.GetValueObject(),
match_data.GetMatchesVector(), current_format,
&reason_why))
continue;
return current_format;
}
- if (log)
- log->Printf(
- "[CategoryMap::GetSummaryFormat] nothing found - returning empty SP");
+ LLDB_LOGF(
+ log,
+ "[CategoryMap::GetSummaryFormat] nothing found - returning empty SP");
return lldb::TypeSummaryImplSP();
}
@@ -261,7 +260,8 @@ TypeCategoryMap::GetSyntheticChildren(FormattersMatchData &match_data) {
if (log) {
for (auto match : match_data.GetMatchesVector()) {
- log->Printf(
+ LLDB_LOGF(
+ log,
"[CategoryMap::GetSyntheticChildren] candidate match = %s %s %s %s "
"reason = %" PRIu32,
match.GetTypeName().GetCString(),
@@ -275,19 +275,18 @@ TypeCategoryMap::GetSyntheticChildren(FormattersMatchData &match_data) {
for (begin = m_active_categories.begin(); begin != end; begin++) {
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::SyntheticChildrenSP current_format;
- if (log)
- log->Printf(
- "[CategoryMap::GetSyntheticChildren] Trying to use category %s",
- category_sp->GetName());
+ LLDB_LOGF(log,
+ "[CategoryMap::GetSyntheticChildren] Trying to use category %s",
+ category_sp->GetName());
if (!category_sp->Get(match_data.GetValueObject(),
match_data.GetMatchesVector(), current_format,
&reason_why))
continue;
return current_format;
}
- if (log)
- log->Printf("[CategoryMap::GetSyntheticChildren] nothing found - returning "
- "empty SP");
+ LLDB_LOGF(log,
+ "[CategoryMap::GetSyntheticChildren] nothing found - returning "
+ "empty SP");
return lldb::SyntheticChildrenSP();
}
@@ -302,7 +301,8 @@ TypeCategoryMap::GetValidator(FormattersMatchData &match_data) {
if (log) {
for (auto match : match_data.GetMatchesVector()) {
- log->Printf(
+ LLDB_LOGF(
+ log,
"[CategoryMap::GetValidator] candidate match = %s %s %s %s reason = "
"%" PRIu32,
match.GetTypeName().GetCString(),
@@ -316,18 +316,16 @@ TypeCategoryMap::GetValidator(FormattersMatchData &match_data) {
for (begin = m_active_categories.begin(); begin != end; begin++) {
lldb::TypeCategoryImplSP category_sp = *begin;
lldb::TypeValidatorImplSP current_format;
- if (log)
- log->Printf("[CategoryMap::GetValidator] Trying to use category %s",
- category_sp->GetName());
+ LLDB_LOGF(log, "[CategoryMap::GetValidator] Trying to use category %s",
+ category_sp->GetName());
if (!category_sp->Get(match_data.GetValueObject(),
match_data.GetMatchesVector(), current_format,
&reason_why))
continue;
return current_format;
}
- if (log)
- log->Printf(
- "[CategoryMap::GetValidator] nothing found - returning empty SP");
+ LLDB_LOGF(log,
+ "[CategoryMap::GetValidator] nothing found - returning empty SP");
return lldb::TypeValidatorImplSP();
}