LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
lldb_private::Language Class Referenceabstract

#include <Language.h>

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

Classes

class  EitherTypeScavenger
 
class  ImageListTypeScavenger
 
class  TypeScavenger
 
class  UnionTypeScavenger
 

Public Types

enum  FunctionNameRepresentation { FunctionNameRepresentation::eName, FunctionNameRepresentation::eNameWithArgs, FunctionNameRepresentation::eNameWithNoArgs }
 

Public Member Functions

 ~Language () override
 
virtual lldb::LanguageType GetLanguageType () const =0
 
virtual bool IsTopLevelFunction (Function &function)
 
virtual bool IsSourceFile (llvm::StringRef file_path) const =0
 
virtual const HighlighterGetHighlighter () const
 
virtual lldb::TypeCategoryImplSP GetFormatters ()
 
virtual HardcodedFormatters::HardcodedFormatFinder GetHardcodedFormats ()
 
virtual HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries ()
 
virtual HardcodedFormatters::HardcodedSyntheticFinder GetHardcodedSynthetics ()
 
virtual std::vector< ConstStringGetPossibleFormattersMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
virtual std::unique_ptr< TypeScavengerGetTypeScavenger ()
 
virtual const char * GetLanguageSpecificTypeLookupHelp ()
 
virtual std::vector< ConstStringGetMethodNameVariants (ConstString method_name) const
 
virtual bool SymbolNameFitsToLanguage (Mangled name) const
 Returns true iff the given symbol name is compatible with the mangling scheme of this language. More...
 
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 IsNilReference (ValueObject &valobj)
 
virtual llvm::StringRef GetNilReferenceSummaryString ()
 Returns the summary string for ValueObjects for which IsNilReference() is true. More...
 
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
 
virtual ConstString GetPluginName ()=0
 
virtual uint32_t GetPluginVersion ()=0
 
 PluginInterface (const PluginInterface &)=delete
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Static Public Member Functions

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 ()
 

Protected Member Functions

 Language ()
 

Private Member Functions

 Language (const Language &)=delete
 
const Languageoperator= (const Language &)=delete
 

Detailed Description

Definition at line 29 of file Language.h.

Member Enumeration Documentation

◆ FunctionNameRepresentation

Enumerator
eName 
eNameWithArgs 
eNameWithNoArgs 

Definition at line 142 of file Language.h.

Constructor & Destructor Documentation

◆ ~Language()

Language::~Language ( )
override

Definition at line 454 of file Language.cpp.

◆ Language() [1/2]

Language::Language ( )
protected

Definition at line 451 of file Language.cpp.

◆ Language() [2/2]

lldb_private::Language::Language ( const Language )
privatedelete

Member Function Documentation

◆ FindPlugin() [1/3]

Language * Language::FindPlugin ( lldb::LanguageType  language)
static

◆ FindPlugin() [2/3]

Language * Language::FindPlugin ( lldb::LanguageType  language,
llvm::StringRef  file_path 
)
static

Definition at line 90 of file Language.cpp.

◆ FindPlugin() [3/3]

Language * Language::FindPlugin ( llvm::StringRef  file_path)
static

Returns the Language associated with the given file path or a nullptr if there is no known language.

Definition at line 78 of file Language.cpp.

References IsSourceFile().

◆ ForAllLanguages()

void Language::ForAllLanguages ( std::function< bool(lldb::LanguageType)>  callback)
static

Definition at line 220 of file Language.cpp.

References language_names, num_languages, and language_name_pair::type.

◆ ForEach()

void Language::ForEach ( std::function< bool(Language *)>  callback)
static

◆ GetDeclPrintingHelper()

DumpValueObjectOptions::DeclPrintingHelper Language::GetDeclPrintingHelper ( )
virtual

Definition at line 420 of file Language.cpp.

◆ GetDefaultExceptionResolverDescription()

void Language::GetDefaultExceptionResolverDescription ( bool  catch_on,
bool  throw_on,
Stream s 
)
static

Definition at line 444 of file Language.cpp.

References lldb_private::Stream::Printf().

Referenced by ExceptionBreakpointResolver::GetDescription().

◆ GetExceptionResolverDescription()

void Language::GetExceptionResolverDescription ( bool  catch_on,
bool  throw_on,
Stream s 
)
virtual

Definition at line 439 of file Language.cpp.

Referenced by ExceptionBreakpointResolver::GetDescription().

◆ GetFormatterPrefixSuffix()

bool Language::GetFormatterPrefixSuffix ( ValueObject valobj,
ConstString  type_hint,
std::string prefix,
std::string suffix 
)
virtual

Reimplemented in lldb_private::ObjCLanguage.

Definition at line 413 of file Language.cpp.

◆ GetFormatters()

lldb::TypeCategoryImplSP Language::GetFormatters ( )
virtual

Reimplemented in lldb_private::ObjCLanguage, and lldb_private::CPlusPlusLanguage.

Definition at line 121 of file Language.cpp.

◆ GetFunctionDisplayName()

bool Language::GetFunctionDisplayName ( const SymbolContext sc,
const ExecutionContext exe_ctx,
FunctionNameRepresentation  representation,
Stream s 
)
virtual

Definition at line 432 of file Language.cpp.

Referenced by lldb_private::FormatEntity::Format().

◆ GetHardcodedFormats()

HardcodedFormatters::HardcodedFormatFinder Language::GetHardcodedFormats ( )
virtual

Definition at line 123 of file Language.cpp.

◆ GetHardcodedSummaries()

HardcodedFormatters::HardcodedSummaryFinder Language::GetHardcodedSummaries ( )
virtual

Reimplemented in lldb_private::CPlusPlusLanguage.

Definition at line 127 of file Language.cpp.

◆ GetHardcodedSynthetics()

HardcodedFormatters::HardcodedSyntheticFinder Language::GetHardcodedSynthetics ( )
virtual

Reimplemented in lldb_private::CPlusPlusLanguage.

Definition at line 132 of file Language.cpp.

◆ GetHighlighter()

virtual const Highlighter* lldb_private::Language::GetHighlighter ( ) const
inlinevirtual

◆ GetLanguageSpecificTypeLookupHelp()

const char * Language::GetLanguageSpecificTypeLookupHelp ( )
virtual

Definition at line 363 of file Language.cpp.

◆ GetLanguagesSupportingREPLs()

LanguageSet Language::GetLanguagesSupportingREPLs ( )
static

Definition at line 355 of file Language.cpp.

Referenced by lldb_private::Target::GetREPL(), and lldb_private::Debugger::RunREPL().

◆ GetLanguagesSupportingTypeSystems()

LanguageSet Language::GetLanguagesSupportingTypeSystems ( )
static

Definition at line 347 of file Language.cpp.

Referenced by lldb_private::CommandCompletions::TypeLanguages().

◆ GetLanguagesSupportingTypeSystemsForExpressions()

LanguageSet Language::GetLanguagesSupportingTypeSystemsForExpressions ( )
static

◆ GetLanguageType()

virtual lldb::LanguageType lldb_private::Language::GetLanguageType ( ) const
pure virtual

◆ GetLanguageTypeFromString() [1/2]

static lldb::LanguageType lldb_private::Language::GetLanguageTypeFromString ( const char *  string)
staticdelete

◆ GetLanguageTypeFromString() [2/2]

LanguageType Language::GetLanguageTypeFromString ( llvm::StringRef  string)
static

Definition at line 197 of file Language.cpp.

References lldb::eLanguageTypeUnknown, and language_names.

◆ GetMethodNameVariants()

virtual std::vector<ConstString> lldb_private::Language::GetMethodNameVariants ( ConstString  method_name) const
inlinevirtual

Reimplemented in lldb_private::ObjCLanguage.

Definition at line 191 of file Language.h.

◆ GetNameForLanguageType()

const char * Language::GetNameForLanguageType ( lldb::LanguageType  language)
static

◆ GetNilReferenceSummaryString()

virtual llvm::StringRef lldb_private::Language::GetNilReferenceSummaryString ( )
inlinevirtual

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

Reimplemented in lldb_private::ObjCLanguage, lldb_private::CPlusPlusLanguage, and lldb_private::ObjCPlusPlusLanguage.

Definition at line 223 of file Language.h.

◆ GetPossibleFormattersMatches()

std::vector< ConstString > Language::GetPossibleFormattersMatches ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)
virtual

Reimplemented in lldb_private::ObjCLanguage.

Definition at line 137 of file Language.cpp.

◆ GetPrimaryLanguage()

LanguageType Language::GetPrimaryLanguage ( lldb::LanguageType  language)
static

◆ GetSupportedLanguages()

std::set< lldb::LanguageType > Language::GetSupportedLanguages ( )
static

◆ GetTypeScavenger()

std::unique_ptr< Language::TypeScavenger > Language::GetTypeScavenger ( )
virtual

Reimplemented in lldb_private::ObjCLanguage, and lldb_private::CPlusPlusLanguage.

Definition at line 359 of file Language.cpp.

◆ IsLogicalTrue()

LazyBool Language::IsLogicalTrue ( ValueObject valobj,
Status error 
)
virtual

Definition at line 424 of file Language.cpp.

References lldb_private::eLazyBoolCalculate.

◆ IsNilReference()

bool Language::IsNilReference ( ValueObject valobj)
virtual

Reimplemented in lldb_private::ObjCLanguage, and lldb_private::CPlusPlusLanguage.

Definition at line 428 of file Language.cpp.

◆ IsSourceFile()

virtual bool lldb_private::Language::IsSourceFile ( llvm::StringRef  file_path) const
pure virtual

◆ IsTopLevelFunction()

bool Language::IsTopLevelFunction ( Function function)
virtual

Definition at line 119 of file Language.cpp.

◆ IsUninitializedReference()

bool Language::IsUninitializedReference ( ValueObject valobj)
virtual

Definition at line 430 of file Language.cpp.

◆ LanguageIsC()

bool Language::LanguageIsC ( lldb::LanguageType  language)
static

◆ LanguageIsCFamily()

bool Language::LanguageIsCFamily ( lldb::LanguageType  language)
static

◆ LanguageIsCPlusPlus()

bool Language::LanguageIsCPlusPlus ( lldb::LanguageType  language)
static

◆ LanguageIsObjC()

bool Language::LanguageIsObjC ( lldb::LanguageType  language)
static

◆ LanguageIsPascal()

bool Language::LanguageIsPascal ( lldb::LanguageType  language)
static

Definition at line 281 of file Language.cpp.

References lldb::eLanguageTypePascal83.

◆ operator=()

const Language& lldb_private::Language::operator= ( const Language )
privatedelete

◆ PrintAllLanguages()

void Language::PrintAllLanguages ( Stream s,
const char *  prefix,
const char *  suffix 
)
static

◆ SymbolNameFitsToLanguage()

virtual bool lldb_private::Language::SymbolNameFitsToLanguage ( Mangled  name) const
inlinevirtual

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 in lldb_private::CPlusPlusLanguage, and lldb_private::ObjCLanguage.

Definition at line 200 of file Language.h.


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