[Lldb-commits] [PATCH] D71236: [FormatManager] GetCandidateLanguages shouldn't know about ValueObject.
Davide Italiano via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 9 17:17:31 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbc69dd2cfae3: [FormatManager] GetCandidateLanguages shouldn't know about ValueObject. (authored by davide).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71236/new/
https://reviews.llvm.org/D71236
Files:
lldb/include/lldb/DataFormatters/FormatManager.h
lldb/source/DataFormatters/FormatClasses.cpp
lldb/source/DataFormatters/FormatManager.cpp
Index: lldb/source/DataFormatters/FormatManager.cpp
===================================================================
--- lldb/source/DataFormatters/FormatManager.cpp
+++ lldb/source/DataFormatters/FormatManager.cpp
@@ -238,7 +238,8 @@
}
}
- 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 @@
}
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:
Index: lldb/source/DataFormatters/FormatClasses.cpp
===================================================================
--- lldb/source/DataFormatters/FormatClasses.cpp
+++ lldb/source/DataFormatters/FormatClasses.cpp
@@ -24,7 +24,8 @@
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() {
Index: lldb/include/lldb/DataFormatters/FormatManager.h
===================================================================
--- lldb/include/lldb/DataFormatters/FormatManager.h
+++ lldb/include/lldb/DataFormatters/FormatManager.h
@@ -189,9 +189,6 @@
GetCandidateLanguages(lldb::LanguageType lang_type);
private:
- static std::vector<lldb::LanguageType>
- GetCandidateLanguages(ValueObject &valobj);
-
static void GetPossibleMatches(ValueObject &valobj,
CompilerType compiler_type, uint32_t reason,
lldb::DynamicValueType use_dynamic,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71236.232977.patch
Type: text/x-patch
Size: 2235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191210/64686cca/attachment.bin>
More information about the lldb-commits
mailing list