LLDB  mainline
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
lldb_private::CPlusPlusLanguage Class Reference

#include <CPlusPlusLanguage.h>

Inheritance diagram for lldb_private::CPlusPlusLanguage:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::CPlusPlusLanguage:
Collaboration graph
[legend]

Classes

class  MethodName
 

Public Member Functions

 CPlusPlusLanguage ()=default
 
 ~CPlusPlusLanguage () override=default
 
lldb::LanguageType GetLanguageType () const override
 
std::unique_ptr< TypeScavengerGetTypeScavenger () override
 
lldb::TypeCategoryImplSP GetFormatters () override
 
HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries () override
 
HardcodedFormatters::HardcodedSyntheticFinder GetHardcodedSynthetics () override
 
bool IsNilReference (ValueObject &valobj) override
 
llvm::StringRef GetNilReferenceSummaryString () override
 Returns the summary string for ValueObjects for which IsNilReference() is true. More...
 
bool IsSourceFile (llvm::StringRef file_path) const override
 
const HighlighterGetHighlighter () const override
 
bool SymbolNameFitsToLanguage (Mangled mangled) const override
 Returns true iff the given symbol name is compatible with the mangling scheme of this language. More...
 
ConstString GetDemangledFunctionNameWithoutArguments (Mangled mangled) const override
 
std::vector< ConstStringGenerateAlternateFunctionManglings (const ConstString mangled) const override
 
ConstString FindBestAlternateFunctionMangledName (const Mangled mangled, const SymbolContext &sym_ctx) const override
 
llvm::StringRef GetPluginName () override
 
- Public Member Functions inherited from lldb_private::Language
 ~Language () override
 
virtual bool IsTopLevelFunction (Function &function)
 
virtual HardcodedFormatters::HardcodedFormatFinder GetHardcodedFormats ()
 
virtual std::vector< ConstStringGetPossibleFormattersMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
virtual const char * GetLanguageSpecificTypeLookupHelp ()
 
virtual std::vector< Language::MethodNameVariantGetMethodNameVariants (ConstString method_name) const
 
virtual bool GetFormatterPrefixSuffix (ValueObject &valobj, ConstString type_hint, std::string &prefix, std::string &suffix)
 
virtual DumpValueObjectOptions::DeclPrintingHelper GetDeclPrintingHelper ()
 
virtual LazyBool IsLogicalTrue (ValueObject &valobj, Status &error)
 
virtual bool IsUninitializedReference (ValueObject &valobj)
 
virtual bool GetFunctionDisplayName (const SymbolContext *sc, const ExecutionContext *exe_ctx, FunctionNameRepresentation representation, Stream &s)
 
virtual void GetExceptionResolverDescription (bool catch_on, bool throw_on, Stream &s)
 
- Public Member Functions inherited from lldb_private::PluginInterface
 PluginInterface ()=default
 
virtual ~PluginInterface ()=default
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static lldb_private::LanguageCreateInstance (lldb::LanguageType language)
 
static llvm::StringRef GetPluginNameStatic ()
 
static bool IsCPPMangledName (llvm::StringRef name)
 
static bool ExtractContextAndIdentifier (const char *name, llvm::StringRef &context, llvm::StringRef &identifier)
 
- Static Public Member Functions inherited from lldb_private::Language
static LanguageFindPlugin (lldb::LanguageType language)
 
static LanguageFindPlugin (llvm::StringRef file_path)
 Returns the Language associated with the given file path or a nullptr if there is no known language. More...
 
static LanguageFindPlugin (lldb::LanguageType language, llvm::StringRef file_path)
 
static void ForEach (std::function< bool(Language *)> callback)
 
static void GetDefaultExceptionResolverDescription (bool catch_on, bool throw_on, Stream &s)
 
static lldb::LanguageType GetLanguageTypeFromString (const char *string)=delete
 
static lldb::LanguageType GetLanguageTypeFromString (llvm::StringRef string)
 
static const char * GetNameForLanguageType (lldb::LanguageType language)
 
static void PrintAllLanguages (Stream &s, const char *prefix, const char *suffix)
 
static void ForAllLanguages (std::function< bool(lldb::LanguageType)> callback)
 
static bool LanguageIsCPlusPlus (lldb::LanguageType language)
 
static bool LanguageIsObjC (lldb::LanguageType language)
 
static bool LanguageIsC (lldb::LanguageType language)
 
static bool LanguageIsCFamily (lldb::LanguageType language)
 Equivalent to LanguageIsC||LanguageIsObjC||LanguageIsCPlusPlus. More...
 
static bool LanguageIsPascal (lldb::LanguageType language)
 
static lldb::LanguageType GetPrimaryLanguage (lldb::LanguageType language)
 
static std::set< lldb::LanguageTypeGetSupportedLanguages ()
 
static LanguageSet GetLanguagesSupportingTypeSystems ()
 
static LanguageSet GetLanguagesSupportingTypeSystemsForExpressions ()
 
static LanguageSet GetLanguagesSupportingREPLs ()
 

Private Attributes

ClangHighlighter m_highlighter
 

Additional Inherited Members

- Public Types inherited from lldb_private::Language
enum  FunctionNameRepresentation { FunctionNameRepresentation::eName, FunctionNameRepresentation::eNameWithArgs, FunctionNameRepresentation::eNameWithNoArgs }
 
- Protected Member Functions inherited from lldb_private::Language
 Language ()
 

Detailed Description

Definition at line 24 of file CPlusPlusLanguage.h.

Constructor & Destructor Documentation

◆ CPlusPlusLanguage()

lldb_private::CPlusPlusLanguage::CPlusPlusLanguage ( )
default

◆ ~CPlusPlusLanguage()

lldb_private::CPlusPlusLanguage::~CPlusPlusLanguage ( )
overridedefault

Member Function Documentation

◆ CreateInstance()

Language * CPlusPlusLanguage::CreateInstance ( lldb::LanguageType  language)
static

Definition at line 95 of file CPlusPlusLanguage.cpp.

References lldb::eLanguageTypeObjC_plus_plus.

◆ ExtractContextAndIdentifier()

bool CPlusPlusLanguage::ExtractContextAndIdentifier ( const char *  name,
llvm::StringRef &  context,
llvm::StringRef &  identifier 
)
static

◆ FindBestAlternateFunctionMangledName()

ConstString CPlusPlusLanguage::FindBestAlternateFunctionMangledName ( const Mangled  mangled,
const SymbolContext sym_ctx 
) const
overridevirtual

◆ GenerateAlternateFunctionManglings()

std::vector< ConstString > CPlusPlusLanguage::GenerateAlternateFunctionManglings ( const ConstString  mangled) const
overridevirtual

Get a basic set of alternative manglings for the given symbol name, by making a few basic possible substitutions on basic types, storage duration and constness for the given symbol. The output parameter alternates is filled with a best-guess, non-exhaustive set of different manglings for the given name.

Reimplemented from lldb_private::Language.

Definition at line 416 of file CPlusPlusLanguage.cpp.

References lldb_private::ConstString::GetCString(), lldb_private::ConstString::GetStringRef(), and string().

◆ GetDemangledFunctionNameWithoutArguments()

ConstString CPlusPlusLanguage::GetDemangledFunctionNameWithoutArguments ( Mangled  mangled) const
overridevirtual

◆ GetFormatters()

lldb::TypeCategoryImplSP lldb_private::CPlusPlusLanguage::GetFormatters ( )
overridevirtual

Reimplemented from lldb_private::Language.

◆ GetHardcodedSummaries()

HardcodedFormatters::HardcodedSummaryFinder lldb_private::CPlusPlusLanguage::GetHardcodedSummaries ( )
overridevirtual

Reimplemented from lldb_private::Language.

◆ GetHardcodedSynthetics()

HardcodedFormatters::HardcodedSyntheticFinder lldb_private::CPlusPlusLanguage::GetHardcodedSynthetics ( )
overridevirtual

Reimplemented from lldb_private::Language.

◆ GetHighlighter()

const Highlighter* lldb_private::CPlusPlusLanguage::GetHighlighter ( ) const
inlineoverridevirtual

Reimplemented from lldb_private::Language.

Definition at line 96 of file CPlusPlusLanguage.h.

References m_highlighter.

◆ GetLanguageType()

lldb::LanguageType lldb_private::CPlusPlusLanguage::GetLanguageType ( ) const
inlineoverridevirtual

Implements lldb_private::Language.

Definition at line 78 of file CPlusPlusLanguage.h.

References lldb::eLanguageTypeC_plus_plus.

◆ GetNilReferenceSummaryString()

llvm::StringRef lldb_private::CPlusPlusLanguage::GetNilReferenceSummaryString ( )
inlineoverridevirtual

Returns the summary string for ValueObjects for which IsNilReference() is true.

Reimplemented from lldb_private::Language.

Definition at line 92 of file CPlusPlusLanguage.h.

◆ GetPluginName()

llvm::StringRef lldb_private::CPlusPlusLanguage::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 137 of file CPlusPlusLanguage.h.

References GetPluginNameStatic().

◆ GetPluginNameStatic()

static llvm::StringRef lldb_private::CPlusPlusLanguage::GetPluginNameStatic ( )
inlinestatic

Definition at line 105 of file CPlusPlusLanguage.h.

Referenced by GetPluginName().

◆ GetTypeScavenger()

std::unique_ptr<TypeScavenger> lldb_private::CPlusPlusLanguage::GetTypeScavenger ( )
overridevirtual

Reimplemented from lldb_private::Language.

◆ Initialize()

void CPlusPlusLanguage::Initialize ( )
static

Definition at line 50 of file CPlusPlusLanguage.cpp.

◆ IsCPPMangledName()

bool CPlusPlusLanguage::IsCPPMangledName ( llvm::StringRef  name)
static

◆ IsNilReference()

bool lldb_private::CPlusPlusLanguage::IsNilReference ( ValueObject valobj)
overridevirtual

Reimplemented from lldb_private::Language.

◆ IsSourceFile()

bool lldb_private::CPlusPlusLanguage::IsSourceFile ( llvm::StringRef  file_path) const
overridevirtual

◆ SymbolNameFitsToLanguage()

bool CPlusPlusLanguage::SymbolNameFitsToLanguage ( Mangled  name) const
overridevirtual

Returns true iff the given symbol name is compatible with the mangling scheme of this language.

This function should only return true if there is a high confidence that the name actually belongs to this language.

Reimplemented from lldb_private::Language.

Definition at line 59 of file CPlusPlusLanguage.cpp.

◆ Terminate()

void CPlusPlusLanguage::Terminate ( )
static

Definition at line 55 of file CPlusPlusLanguage.cpp.

Member Data Documentation

◆ m_highlighter

ClangHighlighter lldb_private::CPlusPlusLanguage::m_highlighter
private

Definition at line 25 of file CPlusPlusLanguage.h.

Referenced by GetHighlighter().


The documentation for this class was generated from the following files: