LLDB  mainline
FormatClasses.cpp
Go to the documentation of this file.
1 //===-- FormatClasses.cpp -------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
12 
13 
14 
15 
16 
17 using namespace lldb;
18 using namespace lldb_private;
19 
20 FormattersMatchData::FormattersMatchData(ValueObject &valobj,
21  lldb::DynamicValueType use_dynamic)
22  : m_valobj(valobj), m_dynamic_value_type(use_dynamic),
23  m_formatters_match_vector({}, false), m_type_for_cache(),
24  m_candidate_languages() {
25  m_type_for_cache = FormatManager::GetTypeForCache(valobj, use_dynamic);
26  m_candidate_languages =
27  FormatManager::GetCandidateLanguages(valobj.GetObjectRuntimeLanguage());
28 }
29 
31  if (!m_formatters_match_vector.second) {
32  m_formatters_match_vector.second = true;
35  }
36  return m_formatters_match_vector.first;
37 }
38 
40 
42  return m_candidate_languages;
43 }
44 
46 
48  return m_dynamic_value_type;
49 }
lldb_private::FormattersMatchData::m_valobj
ValueObject & m_valobj
Definition: FormatClasses.h:99
lldb_private::FormatManager::GetPossibleMatches
static FormattersMatchVector GetPossibleMatches(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
Definition: FormatManager.h:163
FormatClasses.h
FormatManager.h
lldb_private::FormatManager::GetCandidateLanguages
static std::vector< lldb::LanguageType > GetCandidateLanguages(lldb::LanguageType lang_type)
Definition: FormatManager.cpp:568
lldb_private::FormattersMatchData::GetMatchesVector
FormattersMatchVector GetMatchesVector()
Definition: FormatClasses.cpp:30
lldb_private::FormattersMatchVector
std::vector< FormattersMatchCandidate > FormattersMatchVector
Definition: FormatClasses.h:81
lldb_private::FormattersMatchData::GetDynamicValueType
lldb::DynamicValueType GetDynamicValueType()
Definition: FormatClasses.cpp:47
lldb_private::FormattersMatchData::GetTypeForCache
ConstString GetTypeForCache()
Definition: FormatClasses.cpp:39
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::FormattersMatchData::GetCandidateLanguages
CandidateLanguagesVector GetCandidateLanguages()
Definition: FormatClasses.cpp:41
lldb::DynamicValueType
DynamicValueType
Definition: lldb-enumerations.h:494
lldb_private::FormattersMatchData::m_formatters_match_vector
std::pair< FormattersMatchVector, bool > m_formatters_match_vector
Definition: FormatClasses.h:101
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::FormattersMatchData::m_dynamic_value_type
lldb::DynamicValueType m_dynamic_value_type
Definition: FormatClasses.h:100
lldb_private::FormattersMatchData::m_candidate_languages
CandidateLanguagesVector m_candidate_languages
Definition: FormatClasses.h:103
lldb_private::FormattersMatchData::m_type_for_cache
ConstString m_type_for_cache
Definition: FormatClasses.h:102
lldb_private::FormattersMatchData::GetValueObject
ValueObject & GetValueObject()
Definition: FormatClasses.cpp:45
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::FormatManager::GetTypeForCache
static ConstString GetTypeForCache(ValueObject &, lldb::DynamicValueType)
Definition: FormatManager.cpp:556
lldb_private::CandidateLanguagesVector
std::vector< lldb::LanguageType > CandidateLanguagesVector
Definition: FormatClasses.h:82
lldb
Definition: SBAddress.h:15