forked from OSchip/llvm-project
Reapply r253423 and r253424 (which cleanup the data formatters iteration model, as well as the type X list commands), along with a change by Zachary Turner to bypass a MSVC bug with SFINAE
llvm-svn: 253493
This commit is contained in:
parent
e7891d033e
commit
3de08c5f0c
|
@ -101,7 +101,7 @@ public:
|
||||||
Clear ();
|
Clear ();
|
||||||
|
|
||||||
static void
|
static void
|
||||||
LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* callback_baton);
|
ForEach (std::function<bool(ConstString, const lldb::TypeSummaryImplSP&)> callback);
|
||||||
|
|
||||||
static uint32_t
|
static uint32_t
|
||||||
GetCount ();
|
GetCount ();
|
||||||
|
@ -157,9 +157,6 @@ public:
|
||||||
static void
|
static void
|
||||||
DisableStar ();
|
DisableStar ();
|
||||||
|
|
||||||
static void
|
|
||||||
LoopThrough (FormatManager::CategoryCallback callback, void* callback_baton);
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ForEach (TypeCategoryMap::ForEachCallback callback);
|
ForEach (TypeCategoryMap::ForEachCallback callback);
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ class FormatManager : public IFormatChangeListener
|
||||||
public:
|
public:
|
||||||
typedef std::map<lldb::LanguageType, LanguageCategory::UniquePointer> LanguageCategories;
|
typedef std::map<lldb::LanguageType, LanguageCategory::UniquePointer> LanguageCategories;
|
||||||
|
|
||||||
typedef TypeCategoryMap::CallbackType CategoryCallback;
|
|
||||||
|
|
||||||
FormatManager();
|
FormatManager();
|
||||||
|
|
||||||
~FormatManager() override = default;
|
~FormatManager() override = default;
|
||||||
|
@ -139,9 +137,6 @@ public:
|
||||||
return m_categories_map.GetAtIndex(index);
|
return m_categories_map.GetAtIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LoopThroughCategories (CategoryCallback callback, void* param);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ForEachCategory (TypeCategoryMap::ForEachCallback callback);
|
ForEachCategory (TypeCategoryMap::ForEachCallback callback);
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,6 @@ public:
|
||||||
typedef typename ValueType::SharedPointer ValueSP;
|
typedef typename ValueType::SharedPointer ValueSP;
|
||||||
typedef std::map<KeyType, ValueSP> MapType;
|
typedef std::map<KeyType, ValueSP> MapType;
|
||||||
typedef typename MapType::iterator MapIterator;
|
typedef typename MapType::iterator MapIterator;
|
||||||
typedef std::function<bool(void*, KeyType, const ValueSP&)> CallbackType;
|
|
||||||
|
|
||||||
typedef std::function<bool(KeyType, const ValueSP&)> ForEachCallback;
|
typedef std::function<bool(KeyType, const ValueSP&)> ForEachCallback;
|
||||||
|
|
||||||
FormatMap(IFormatChangeListener* lst) :
|
FormatMap(IFormatChangeListener* lst) :
|
||||||
|
@ -140,22 +138,6 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LoopThrough (CallbackType callback, void* param)
|
|
||||||
{
|
|
||||||
if (callback)
|
|
||||||
{
|
|
||||||
Mutex::Locker locker(m_map_mutex);
|
|
||||||
MapIterator pos, end = m_map.end();
|
|
||||||
for (pos = m_map.begin(); pos != end; pos++)
|
|
||||||
{
|
|
||||||
KeyType type = pos->first;
|
|
||||||
if (!callback(param, type, pos->second))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ForEach (ForEachCallback callback)
|
ForEach (ForEachCallback callback)
|
||||||
{
|
{
|
||||||
|
@ -242,7 +224,6 @@ public:
|
||||||
typedef typename MapType::iterator MapIterator;
|
typedef typename MapType::iterator MapIterator;
|
||||||
typedef typename MapType::key_type MapKeyType;
|
typedef typename MapType::key_type MapKeyType;
|
||||||
typedef typename MapType::mapped_type MapValueType;
|
typedef typename MapType::mapped_type MapValueType;
|
||||||
typedef typename BackEndType::CallbackType CallbackType;
|
|
||||||
typedef typename BackEndType::ForEachCallback ForEachCallback;
|
typedef typename BackEndType::ForEachCallback ForEachCallback;
|
||||||
typedef typename std::shared_ptr<FormattersContainer<KeyType, ValueType> > SharedPointer;
|
typedef typename std::shared_ptr<FormattersContainer<KeyType, ValueType> > SharedPointer;
|
||||||
|
|
||||||
|
@ -315,12 +296,6 @@ public:
|
||||||
m_format_map.Clear();
|
m_format_map.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LoopThrough (CallbackType callback, void* param)
|
|
||||||
{
|
|
||||||
m_format_map.LoopThrough(callback,param);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ForEach (ForEachCallback callback)
|
ForEach (ForEachCallback callback)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,14 +67,6 @@ namespace lldb_private {
|
||||||
return m_regex_sp;
|
return m_regex_sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
LoopThrough (typename ExactMatchContainer::CallbackType exact_callback,
|
|
||||||
typename RegexMatchContainer::CallbackType regex_callback)
|
|
||||||
{
|
|
||||||
GetExactMatch()->LoopThrough(exact_callback);
|
|
||||||
GetRegexMatch()->LoopThrough(regex_callback);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
GetCount ()
|
GetCount ()
|
||||||
{
|
{
|
||||||
|
@ -95,7 +87,7 @@ namespace lldb_private {
|
||||||
typedef FormatterContainerPair<TypeValidatorImpl> ValidatorContainer;
|
typedef FormatterContainerPair<TypeValidatorImpl> ValidatorContainer;
|
||||||
|
|
||||||
#ifndef LLDB_DISABLE_PYTHON
|
#ifndef LLDB_DISABLE_PYTHON
|
||||||
typedef FormatterContainerPair<ScriptedSyntheticChildren> SynthContainer;
|
typedef FormatterContainerPair<SyntheticChildren> SynthContainer;
|
||||||
#endif // LLDB_DISABLE_PYTHON
|
#endif // LLDB_DISABLE_PYTHON
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -118,74 +110,84 @@ namespace lldb_private {
|
||||||
typedef ValidatorContainer::ExactMatchContainerSP ValidatorContainerSP;
|
typedef ValidatorContainer::ExactMatchContainerSP ValidatorContainerSP;
|
||||||
typedef ValidatorContainer::RegexMatchContainerSP RegexValidatorContainerSP;
|
typedef ValidatorContainer::RegexMatchContainerSP RegexValidatorContainerSP;
|
||||||
|
|
||||||
class ForEach
|
template <typename T>
|
||||||
|
class ForEachCallbacks
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ForEach () = default;
|
ForEachCallbacks () = default;
|
||||||
~ForEach () = default;
|
~ForEachCallbacks () = default;
|
||||||
|
|
||||||
ForEach&
|
template<typename U = TypeFormatImpl>
|
||||||
SetFormatExactCallback (FormatContainer::ExactMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetExact (FormatContainer::ExactMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_format_exact = callback;
|
m_format_exact = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
ForEach&
|
template<typename U = TypeFormatImpl>
|
||||||
SetFormatRegexCallback (FormatContainer::RegexMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetWithRegex (FormatContainer::RegexMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_format_regex = callback;
|
m_format_regex = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach&
|
template<typename U = TypeSummaryImpl>
|
||||||
SetSummaryExactCallback (SummaryContainer::ExactMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetExact (SummaryContainer::ExactMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_summary_exact = callback;
|
m_summary_exact = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
ForEach&
|
template<typename U = TypeSummaryImpl>
|
||||||
SetSummaryRegexCallback (SummaryContainer::RegexMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetWithRegex (SummaryContainer::RegexMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_summary_regex = callback;
|
m_summary_regex = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ForEach&
|
template<typename U = TypeFilterImpl>
|
||||||
SetFilterExactCallback (FilterContainer::ExactMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetExact (FilterContainer::ExactMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_filter_exact = callback;
|
m_filter_exact = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
ForEach&
|
template<typename U = TypeFilterImpl>
|
||||||
SetFilterRegexCallback (FilterContainer::RegexMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetWithRegex (FilterContainer::RegexMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_filter_regex = callback;
|
m_filter_regex = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef LLDB_DISABLE_PYTHON
|
#ifndef LLDB_DISABLE_PYTHON
|
||||||
ForEach&
|
template<typename U = SyntheticChildren>
|
||||||
SetSynthExactCallback (SynthContainer::ExactMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetExact (SynthContainer::ExactMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_synth_exact = callback;
|
m_synth_exact = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
ForEach&
|
template<typename U = SyntheticChildren>
|
||||||
SetSynthRegexCallback (SynthContainer::RegexMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetWithRegex (SynthContainer::RegexMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_synth_regex = callback;
|
m_synth_regex = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif // LLDB_DISABLE_PYTHON
|
#endif // LLDB_DISABLE_PYTHON
|
||||||
|
template<typename U = TypeValidatorImpl>
|
||||||
ForEach&
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
SetValidatorExactCallback (ValidatorContainer::ExactMatchForEachCallback callback)
|
SetExact (ValidatorContainer::ExactMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_validator_exact = callback;
|
m_validator_exact = callback;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
ForEach&
|
template<typename U = TypeValidatorImpl>
|
||||||
SetValidatorRegexCallback (ValidatorContainer::RegexMatchForEachCallback callback)
|
typename std::enable_if<std::is_same<U,T>::value, ForEachCallbacks&>::type
|
||||||
|
SetWithRegex (ValidatorContainer::RegexMatchForEachCallback callback)
|
||||||
{
|
{
|
||||||
m_validator_regex = callback;
|
m_validator_regex = callback;
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -271,8 +273,9 @@ namespace lldb_private {
|
||||||
ConstString name,
|
ConstString name,
|
||||||
std::initializer_list<lldb::LanguageType> langs = {});
|
std::initializer_list<lldb::LanguageType> langs = {});
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
void
|
void
|
||||||
ForEach (const ForEach &foreach)
|
ForEach (const ForEachCallbacks<T> &foreach)
|
||||||
{
|
{
|
||||||
GetTypeFormatsContainer()->ForEach(foreach.GetFormatExactCallback());
|
GetTypeFormatsContainer()->ForEach(foreach.GetFormatExactCallback());
|
||||||
GetRegexTypeFormatsContainer()->ForEach(foreach.GetFormatRegexCallback());
|
GetRegexTypeFormatsContainer()->ForEach(foreach.GetFormatRegexCallback());
|
||||||
|
|
|
@ -37,8 +37,6 @@ namespace lldb_private {
|
||||||
public:
|
public:
|
||||||
typedef std::map<KeyType, ValueSP> MapType;
|
typedef std::map<KeyType, ValueSP> MapType;
|
||||||
typedef MapType::iterator MapIterator;
|
typedef MapType::iterator MapIterator;
|
||||||
typedef bool(*CallbackType)(void*, const ValueSP&);
|
|
||||||
|
|
||||||
typedef std::function<bool(const ValueSP&)> ForEachCallback;
|
typedef std::function<bool(const ValueSP&)> ForEachCallback;
|
||||||
|
|
||||||
typedef uint32_t Position;
|
typedef uint32_t Position;
|
||||||
|
@ -87,9 +85,6 @@ namespace lldb_private {
|
||||||
Get (uint32_t pos,
|
Get (uint32_t pos,
|
||||||
ValueSP& entry);
|
ValueSP& entry);
|
||||||
|
|
||||||
void
|
|
||||||
LoopThrough (CallbackType callback, void* param);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ForEach (ForEachCallback callback);
|
ForEach (ForEachCallback callback);
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,6 @@ namespace lldb_private {
|
||||||
TypeFormatImpl (const Flags& flags = Flags());
|
TypeFormatImpl (const Flags& flags = Flags());
|
||||||
|
|
||||||
typedef std::shared_ptr<TypeFormatImpl> SharedPointer;
|
typedef std::shared_ptr<TypeFormatImpl> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, lldb::TypeFormatImplSP)> ValueCallback;
|
|
||||||
|
|
||||||
virtual ~TypeFormatImpl ();
|
virtual ~TypeFormatImpl ();
|
||||||
|
|
||||||
|
@ -259,7 +258,6 @@ namespace lldb_private {
|
||||||
const TypeFormatImpl::Flags& flags = Flags());
|
const TypeFormatImpl::Flags& flags = Flags());
|
||||||
|
|
||||||
typedef std::shared_ptr<TypeFormatImpl_Format> SharedPointer;
|
typedef std::shared_ptr<TypeFormatImpl_Format> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, TypeFormatImpl_Format::SharedPointer)> ValueCallback;
|
|
||||||
|
|
||||||
~TypeFormatImpl_Format() override;
|
~TypeFormatImpl_Format() override;
|
||||||
|
|
||||||
|
@ -302,7 +300,6 @@ namespace lldb_private {
|
||||||
const TypeFormatImpl::Flags& flags = Flags());
|
const TypeFormatImpl::Flags& flags = Flags());
|
||||||
|
|
||||||
typedef std::shared_ptr<TypeFormatImpl_EnumType> SharedPointer;
|
typedef std::shared_ptr<TypeFormatImpl_EnumType> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, TypeFormatImpl_EnumType::SharedPointer)> ValueCallback;
|
|
||||||
|
|
||||||
~TypeFormatImpl_EnumType() override;
|
~TypeFormatImpl_EnumType() override;
|
||||||
|
|
||||||
|
|
|
@ -406,8 +406,6 @@ namespace lldb_private {
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef std::shared_ptr<TypeSummaryImpl> SharedPointer;
|
typedef std::shared_ptr<TypeSummaryImpl> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, TypeSummaryImpl::SharedPointer)> SummaryCallback;
|
|
||||||
typedef std::function<bool(void*, lldb::RegularExpressionSP, TypeSummaryImpl::SharedPointer)> RegexSummaryCallback;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
uint32_t m_my_revision;
|
uint32_t m_my_revision;
|
||||||
|
|
|
@ -348,7 +348,6 @@ namespace lldb_private {
|
||||||
GetFrontEnd (ValueObject &backend) = 0;
|
GetFrontEnd (ValueObject &backend) = 0;
|
||||||
|
|
||||||
typedef std::shared_ptr<SyntheticChildren> SharedPointer;
|
typedef std::shared_ptr<SyntheticChildren> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, SyntheticChildren::SharedPointer)> SyntheticChildrenCallback;
|
|
||||||
|
|
||||||
uint32_t&
|
uint32_t&
|
||||||
GetRevision ()
|
GetRevision ()
|
||||||
|
@ -479,6 +478,8 @@ namespace lldb_private {
|
||||||
return SyntheticChildrenFrontEnd::AutoPointer(new FrontEnd(this, backend));
|
return SyntheticChildrenFrontEnd::AutoPointer(new FrontEnd(this, backend));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef std::shared_ptr<TypeFilterImpl> SharedPointer;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(TypeFilterImpl);
|
DISALLOW_COPY_AND_ASSIGN(TypeFilterImpl);
|
||||||
};
|
};
|
||||||
|
|
|
@ -150,7 +150,6 @@ public:
|
||||||
TypeValidatorImpl (const Flags& flags = Flags());
|
TypeValidatorImpl (const Flags& flags = Flags());
|
||||||
|
|
||||||
typedef std::shared_ptr<TypeValidatorImpl> SharedPointer;
|
typedef std::shared_ptr<TypeValidatorImpl> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, TypeValidatorImpl::SharedPointer)> ValueCallback;
|
|
||||||
|
|
||||||
virtual ~TypeValidatorImpl ();
|
virtual ~TypeValidatorImpl ();
|
||||||
|
|
||||||
|
@ -265,7 +264,6 @@ public:
|
||||||
TypeValidatorImpl_CXX (ValidatorFunction f, std::string d, const TypeValidatorImpl::Flags& flags = Flags());
|
TypeValidatorImpl_CXX (ValidatorFunction f, std::string d, const TypeValidatorImpl::Flags& flags = Flags());
|
||||||
|
|
||||||
typedef std::shared_ptr<TypeValidatorImpl_CXX> SharedPointer;
|
typedef std::shared_ptr<TypeValidatorImpl_CXX> SharedPointer;
|
||||||
typedef std::function<bool(void*, ConstString, TypeValidatorImpl_CXX::SharedPointer)> ValueCallback;
|
|
||||||
|
|
||||||
~TypeValidatorImpl_CXX() override;
|
~TypeValidatorImpl_CXX() override;
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ SBTypeCategory::GetFilterForType (SBTypeNameSpecifier spec)
|
||||||
if (!spec.IsValid())
|
if (!spec.IsValid())
|
||||||
return SBTypeFilter();
|
return SBTypeFilter();
|
||||||
|
|
||||||
lldb::SyntheticChildrenSP children_sp;
|
lldb::TypeFilterImplSP children_sp;
|
||||||
|
|
||||||
if (spec.IsRegex())
|
if (spec.IsRegex())
|
||||||
m_opaque_sp->GetRegexTypeFiltersContainer()->GetExact(ConstString(spec.GetName()), children_sp);
|
m_opaque_sp->GetRegexTypeFiltersContainer()->GetExact(ConstString(spec.GetName()), children_sp);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -225,12 +225,6 @@ DataVisualization::Categories::DisableStar ()
|
||||||
GetFormatManager().DisableAllCategories();
|
GetFormatManager().DisableAllCategories();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
DataVisualization::Categories::LoopThrough (FormatManager::CategoryCallback callback, void* callback_baton)
|
|
||||||
{
|
|
||||||
GetFormatManager().LoopThroughCategories(callback, callback_baton);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DataVisualization::Categories::ForEach (TypeCategoryMap::ForEachCallback callback)
|
DataVisualization::Categories::ForEach (TypeCategoryMap::ForEachCallback callback)
|
||||||
{
|
{
|
||||||
|
@ -274,9 +268,9 @@ DataVisualization::NamedSummaryFormats::Clear ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DataVisualization::NamedSummaryFormats::LoopThrough (TypeSummaryImpl::SummaryCallback callback, void* callback_baton)
|
DataVisualization::NamedSummaryFormats::ForEach (std::function<bool(ConstString, const lldb::TypeSummaryImplSP&)> callback)
|
||||||
{
|
{
|
||||||
GetFormatManager().GetNamedSummaryContainer().LoopThrough(callback, callback_baton);
|
GetFormatManager().GetNamedSummaryContainer().ForEach(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
|
|
|
@ -485,21 +485,6 @@ FormatManager::GetValidatorForType (lldb::TypeNameSpecifierImplSP type_sp)
|
||||||
return validator_chosen_sp;
|
return validator_chosen_sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
FormatManager::LoopThroughCategories (CategoryCallback callback, void* param)
|
|
||||||
{
|
|
||||||
m_categories_map.LoopThrough(callback, param);
|
|
||||||
Mutex::Locker locker(m_language_categories_mutex);
|
|
||||||
for (const auto& entry : m_language_categories_map)
|
|
||||||
{
|
|
||||||
if (auto category_sp = entry.second->GetCategory())
|
|
||||||
{
|
|
||||||
if (!callback(param, category_sp))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback)
|
FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback)
|
||||||
{
|
{
|
||||||
|
|
|
@ -372,39 +372,6 @@ TypeCategoryMap::GetValidator (FormattersMatchData& match_data)
|
||||||
return lldb::TypeValidatorImplSP();
|
return lldb::TypeValidatorImplSP();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
TypeCategoryMap::LoopThrough(CallbackType callback, void* param)
|
|
||||||
{
|
|
||||||
if (callback)
|
|
||||||
{
|
|
||||||
Mutex::Locker locker(m_map_mutex);
|
|
||||||
|
|
||||||
// loop through enabled categories in respective order
|
|
||||||
{
|
|
||||||
ActiveCategoriesIterator begin, end = m_active_categories.end();
|
|
||||||
for (begin = m_active_categories.begin(); begin != end; begin++)
|
|
||||||
{
|
|
||||||
lldb::TypeCategoryImplSP category = *begin;
|
|
||||||
if (!callback(param, category))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// loop through disabled categories in just any order
|
|
||||||
{
|
|
||||||
MapIterator pos, end = m_map.end();
|
|
||||||
for (pos = m_map.begin(); pos != end; pos++)
|
|
||||||
{
|
|
||||||
if (pos->second->IsEnabled())
|
|
||||||
continue;
|
|
||||||
KeyType type = pos->first;
|
|
||||||
if (!callback(param, pos->second))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TypeCategoryMap::ForEach(ForEachCallback callback)
|
TypeCategoryMap::ForEach(ForEachCallback callback)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue