aboutsummaryrefslogtreecommitdiff
path: root/lldb/include/lldb/DataFormatters/FormattersContainer.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/include/lldb/DataFormatters/FormattersContainer.h')
-rw-r--r--lldb/include/lldb/DataFormatters/FormattersContainer.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/lldb/include/lldb/DataFormatters/FormattersContainer.h b/lldb/include/lldb/DataFormatters/FormattersContainer.h
index 86023dd9bf0b..d414882bae19 100644
--- a/lldb/include/lldb/DataFormatters/FormattersContainer.h
+++ b/lldb/include/lldb/DataFormatters/FormattersContainer.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef lldb_FormattersContainer_h_
-#define lldb_FormattersContainer_h_
+#ifndef LLDB_DATAFORMATTERS_FORMATTERSCONTAINER_H
+#define LLDB_DATAFORMATTERS_FORMATTERSCONTAINER_H
#include <functional>
#include <map>
@@ -181,16 +181,13 @@ public:
}
bool Get(ValueObject &valobj, MapValueType &entry,
- lldb::DynamicValueType use_dynamic, uint32_t *why = nullptr) {
- uint32_t value = lldb_private::eFormatterChoiceCriterionDirectChoice;
+ lldb::DynamicValueType use_dynamic) {
CompilerType ast_type(valobj.GetCompilerType());
- bool ret = Get(valobj, ast_type, entry, use_dynamic, value);
+ bool ret = Get(valobj, ast_type, entry, use_dynamic);
if (ret)
entry = MapValueType(entry);
else
entry = MapValueType();
- if (why)
- *why = value;
return ret;
}
@@ -221,7 +218,8 @@ protected:
BackEndType m_format_map;
std::string m_name;
- DISALLOW_COPY_AND_ASSIGN(FormattersContainer);
+ FormattersContainer(const FormattersContainer &) = delete;
+ const FormattersContainer &operator=(const FormattersContainer &) = delete;
void Add_Impl(MapKeyType type, const MapValueType &entry,
RegularExpression *dummy) {
@@ -266,7 +264,7 @@ protected:
ConstString key = m_format_map.GetKeyAtIndex(index);
if (key)
return lldb::TypeNameSpecifierImplSP(
- new TypeNameSpecifierImpl(key.AsCString(), false));
+ new TypeNameSpecifierImpl(key.GetStringRef(), false));
else
return lldb::TypeNameSpecifierImplSP();
}
@@ -308,16 +306,13 @@ protected:
return false;
}
- bool Get(const FormattersMatchVector &candidates, MapValueType &entry,
- uint32_t *reason) {
+ bool Get(const FormattersMatchVector &candidates, MapValueType &entry) {
for (const FormattersMatchCandidate &candidate : candidates) {
if (Get(candidate.GetTypeName(), entry)) {
if (candidate.IsMatch(entry) == false) {
entry.reset();
continue;
} else {
- if (reason)
- *reason = candidate.GetReason();
return true;
}
}
@@ -328,4 +323,4 @@ protected:
} // namespace lldb_private
-#endif // lldb_FormattersContainer_h_
+#endif // LLDB_DATAFORMATTERS_FORMATTERSCONTAINER_H