diff options
Diffstat (limited to 'include/lldb/DataFormatters/FormatManager.h')
| -rw-r--r-- | include/lldb/DataFormatters/FormatManager.h | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/include/lldb/DataFormatters/FormatManager.h b/include/lldb/DataFormatters/FormatManager.h index 162e25143f27..3c90c993e0c4 100644 --- a/include/lldb/DataFormatters/FormatManager.h +++ b/include/lldb/DataFormatters/FormatManager.h @@ -23,6 +23,8 @@ #include "lldb/DataFormatters/TypeCategory.h" #include "lldb/DataFormatters/TypeCategoryMap.h" +#include <atomic> + namespace lldb_private { // this file (and its. cpp) contain the low-level implementation of LLDB Data Visualization @@ -32,8 +34,6 @@ namespace lldb_private { class FormatManager : public IFormatChangeListener { - typedef FormatNavigator<ConstString, TypeFormatImpl> ValueNavigator; - typedef ValueNavigator::MapType ValueMap; typedef FormatMap<ConstString, TypeSummaryImpl> NamedSummariesMap; typedef TypeCategoryMap::MapType::iterator CategoryMapIterator; public: @@ -42,12 +42,6 @@ public: FormatManager (); - ValueNavigator& - GetValueNavigator () - { - return m_value_nav; - } - NamedSummariesMap& GetNamedSummaryNavigator () { @@ -124,6 +118,9 @@ public: lldb::TypeCategoryImplSP GetCategory (const ConstString& category_name, bool can_create = true); + + lldb::TypeFormatImplSP + GetFormatForType (lldb::TypeNameSpecifierImplSP type_sp); lldb::TypeSummaryImplSP GetSummaryForType (lldb::TypeNameSpecifierImplSP type_sp); @@ -141,6 +138,10 @@ public: GetSyntheticChildrenForType (lldb::TypeNameSpecifierImplSP type_sp); #endif + lldb::TypeFormatImplSP + GetFormat (ValueObject& valobj, + lldb::DynamicValueType use_dynamic); + lldb::TypeSummaryImplSP GetSummaryFormat (ValueObject& valobj, lldb::DynamicValueType use_dynamic); @@ -188,10 +189,17 @@ public: static lldb::Format GetSingleItemFormat (lldb::Format vector_format); + // this returns true if the ValueObjectPrinter is *highly encouraged* + // to actually represent this ValueObject in one-liner format + // If this object has a summary formatter, however, we should not + // try and do one-lining, just let the summary do the right thing + bool + ShouldPrintAsOneLiner (ValueObject& valobj); + void Changed () { - __sync_add_and_fetch(&m_last_revision, +1); + ++m_last_revision; m_format_cache.Clear (); } @@ -207,9 +215,8 @@ public: private: FormatCache m_format_cache; - ValueNavigator m_value_nav; NamedSummariesMap m_named_summaries_map; - uint32_t m_last_revision; + std::atomic<uint32_t> m_last_revision; TypeCategoryMap m_categories_map; ConstString m_default_category_name; |
