LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected 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 HardcodedFormatters::HardcodedValidatorFinder GetHardcodedValidators ()
 
virtual std::vector< ConstStringGetPossibleFormattersMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
virtual lldb_private::formatters::StringPrinter::EscapingHelper GetStringPrinterEscapingHelper (lldb_private::formatters::StringPrinter::GetPrintableElementType)
 
virtual std::unique_ptr< TypeScavengerGetTypeScavenger ()
 
virtual const char * GetLanguageSpecificTypeLookupHelp ()
 
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 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
virtual ~PluginInterface ()
 
virtual ConstString GetPluginName ()=0
 
virtual uint32_t GetPluginVersion ()=0
 

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 LanguageIsPascal (lldb::LanguageType language)
 
static lldb::LanguageType GetPrimaryLanguage (lldb::LanguageType language)
 
static void GetLanguagesSupportingTypeSystems (std::set< lldb::LanguageType > &languages, std::set< lldb::LanguageType > &languages_for_expressions)
 
static void GetLanguagesSupportingREPLs (std::set< lldb::LanguageType > &languages)
 

Protected Member Functions

 Language ()
 

Detailed Description

Definition at line 28 of file Language.h.

Member Enumeration Documentation

◆ FunctionNameRepresentation

Enumerator
eName 
eNameWithArgs 
eNameWithNoArgs 

Definition at line 141 of file Language.h.

Constructor & Destructor Documentation

◆ ~Language()

Language::~Language ( )
override

Definition at line 450 of file Language.cpp.

◆ Language()

Language::Language ( )
protected

Definition at line 447 of file Language.cpp.

Referenced by GetHighlighter().

Member Function Documentation

◆ FindPlugin() [1/3]

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

◆ FindPlugin() [2/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 79 of file Language.cpp.

References IsSourceFile().

◆ FindPlugin() [3/3]

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

Definition at line 91 of file Language.cpp.

◆ ForAllLanguages()

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

Definition at line 233 of file Language.cpp.

References num_languages, and language_name_pair::type.

Referenced by GetHighlighter().

◆ ForEach()

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

◆ GetDeclPrintingHelper()

DumpValueObjectOptions::DeclPrintingHelper Language::GetDeclPrintingHelper ( )
virtual

Definition at line 416 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetDefaultExceptionResolverDescription()

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

◆ GetExceptionResolverDescription()

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

Definition at line 435 of file Language.cpp.

Referenced by ExceptionBreakpointResolver::GetDescription(), and GetHighlighter().

◆ GetFormatterPrefixSuffix()

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

Reimplemented in lldb_private::ObjCLanguage.

Definition at line 409 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetFormatters()

lldb::TypeCategoryImplSP Language::GetFormatters ( )
virtual

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

Definition at line 122 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetFunctionDisplayName()

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

Definition at line 428 of file Language.cpp.

Referenced by lldb_private::FormatEntity::Format(), and GetHighlighter().

◆ GetHardcodedFormats()

HardcodedFormatters::HardcodedFormatFinder Language::GetHardcodedFormats ( )
virtual

Definition at line 124 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetHardcodedSummaries()

HardcodedFormatters::HardcodedSummaryFinder Language::GetHardcodedSummaries ( )
virtual

Reimplemented in lldb_private::CPlusPlusLanguage.

Definition at line 128 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetHardcodedSynthetics()

HardcodedFormatters::HardcodedSyntheticFinder Language::GetHardcodedSynthetics ( )
virtual

Reimplemented in lldb_private::CPlusPlusLanguage.

Definition at line 133 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetHardcodedValidators()

HardcodedFormatters::HardcodedValidatorFinder Language::GetHardcodedValidators ( )
virtual

Definition at line 138 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetHighlighter()

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

◆ GetLanguageSpecificTypeLookupHelp()

const char * Language::GetLanguageSpecificTypeLookupHelp ( )
virtual

Definition at line 359 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetLanguagesSupportingREPLs()

void Language::GetLanguagesSupportingREPLs ( std::set< lldb::LanguageType > &  languages)
static

◆ GetLanguagesSupportingTypeSystems()

void Language::GetLanguagesSupportingTypeSystems ( std::set< lldb::LanguageType > &  languages,
std::set< lldb::LanguageType > &  languages_for_expressions 
)
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 210 of file Language.cpp.

References lldb::eLanguageTypeUnknown.

◆ GetNameForLanguageType()

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

◆ GetPossibleFormattersMatches()

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

Reimplemented in lldb_private::ObjCLanguage.

Definition at line 143 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetPrimaryLanguage()

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

◆ GetStringPrinterEscapingHelper()

Definition at line 149 of file Language.cpp.

Referenced by GetHighlighter().

◆ GetTypeScavenger()

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

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

Definition at line 355 of file Language.cpp.

Referenced by GetHighlighter().

◆ IsLogicalTrue()

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

Definition at line 420 of file Language.cpp.

References lldb_private::eLazyBoolCalculate.

Referenced by GetHighlighter().

◆ IsNilReference()

bool Language::IsNilReference ( ValueObject valobj)
virtual

Reimplemented in lldb_private::ObjCLanguage.

Definition at line 424 of file Language.cpp.

Referenced by GetHighlighter().

◆ IsSourceFile()

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

◆ IsTopLevelFunction()

bool Language::IsTopLevelFunction ( Function function)
virtual

Definition at line 120 of file Language.cpp.

◆ IsUninitializedReference()

bool Language::IsUninitializedReference ( ValueObject valobj)
virtual

Definition at line 426 of file Language.cpp.

Referenced by GetHighlighter().

◆ LanguageIsC()

bool Language::LanguageIsC ( 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 276 of file Language.cpp.

References lldb::eLanguageTypePascal83.

Referenced by GetHighlighter().

◆ PrintAllLanguages()

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

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