diff options
Diffstat (limited to 'lldb/source/DataFormatters')
-rw-r--r-- | lldb/source/DataFormatters/FormatClasses.cpp | 3 | ||||
-rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/DataFormatters/FormatClasses.cpp b/lldb/source/DataFormatters/FormatClasses.cpp index 271963b5f8f..6a9279f54d6 100644 --- a/lldb/source/DataFormatters/FormatClasses.cpp +++ b/lldb/source/DataFormatters/FormatClasses.cpp @@ -24,7 +24,8 @@ FormattersMatchData::FormattersMatchData(ValueObject &valobj, m_formatters_match_vector({}, false), m_type_for_cache(), m_candidate_languages() { m_type_for_cache = FormatManager::GetTypeForCache(valobj, use_dynamic); - m_candidate_languages = FormatManager::GetCandidateLanguages(valobj); + m_candidate_languages = + FormatManager::GetCandidateLanguages(valobj.GetObjectRuntimeLanguage()); } FormattersMatchVector FormattersMatchData::GetMatchesVector() { diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp index 33aa2dc7a3a..8ae9bcc1c1c 100644 --- a/lldb/source/DataFormatters/FormatManager.cpp +++ b/lldb/source/DataFormatters/FormatManager.cpp @@ -238,7 +238,8 @@ void FormatManager::GetPossibleMatches( } } - for (lldb::LanguageType language_type : GetCandidateLanguages(valobj)) { + for (lldb::LanguageType language_type : + GetCandidateLanguages(valobj.GetObjectRuntimeLanguage())) { if (Language *language = Language::FindPlugin(language_type)) { for (ConstString candidate : language->GetPossibleFormattersMatches(valobj, use_dynamic)) { @@ -579,8 +580,7 @@ ConstString FormatManager::GetTypeForCache(ValueObject &valobj, } std::vector<lldb::LanguageType> -FormatManager::GetCandidateLanguages(ValueObject &valobj) { - lldb::LanguageType lang_type = valobj.GetObjectRuntimeLanguage(); +FormatManager::GetCandidateLanguages(lldb::LanguageType lang_type) { switch (lang_type) { case lldb::eLanguageTypeC: case lldb::eLanguageTypeC89: |