LLDB mainline
Public Types | Public Member Functions | Private Attributes | List of all members
lldb_private::DynamicCheckerFunctions Class Referenceabstract

Encapsulates dynamic check functions used by expressions. More...

#include <DynamicCheckerFunctions.h>

Inheritance diagram for lldb_private::DynamicCheckerFunctions:
Inheritance graph
[legend]

Public Types

enum  DynamicCheckerFunctionsKind { DCF_Clang }
 

Public Member Functions

 DynamicCheckerFunctions (DynamicCheckerFunctionsKind kind)
 
virtual ~DynamicCheckerFunctions ()=default
 
virtual llvm::Error Install (DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx)=0
 Install the utility functions into a process.
 
virtual bool DoCheckersExplainStop (lldb::addr_t addr, Stream &message)=0
 
DynamicCheckerFunctionsKind GetKind () const
 

Private Attributes

const DynamicCheckerFunctionsKind m_kind
 

Detailed Description

Encapsulates dynamic check functions used by expressions.

Each of the utility functions encapsulated in this class is responsible for validating some data that an expression is about to use. Examples are:

a = *b; // check that b is a valid pointer [b init]; // check that b is a valid object to send "init" to

The class installs each checker function into the target process and makes it available to IRDynamicChecks to use.

Definition at line 32 of file DynamicCheckerFunctions.h.

Member Enumeration Documentation

◆ DynamicCheckerFunctionsKind

Enumerator
DCF_Clang 

Definition at line 34 of file DynamicCheckerFunctions.h.

Constructor & Destructor Documentation

◆ DynamicCheckerFunctions()

lldb_private::DynamicCheckerFunctions::DynamicCheckerFunctions ( DynamicCheckerFunctionsKind  kind)
inline

Definition at line 38 of file DynamicCheckerFunctions.h.

◆ ~DynamicCheckerFunctions()

virtual lldb_private::DynamicCheckerFunctions::~DynamicCheckerFunctions ( )
virtualdefault

Member Function Documentation

◆ DoCheckersExplainStop()

virtual bool lldb_private::DynamicCheckerFunctions::DoCheckersExplainStop ( lldb::addr_t  addr,
Stream message 
)
pure virtual

◆ GetKind()

DynamicCheckerFunctionsKind lldb_private::DynamicCheckerFunctions::GetKind ( ) const
inline

Definition at line 57 of file DynamicCheckerFunctions.h.

References m_kind.

Referenced by lldb_private::ClangDynamicCheckerFunctions::classof().

◆ Install()

virtual llvm::Error lldb_private::DynamicCheckerFunctions::Install ( DiagnosticManager diagnostic_manager,
ExecutionContext exe_ctx 
)
pure virtual

Install the utility functions into a process.

This binds the instance of DynamicCheckerFunctions to that process.

Parameters
[in]diagnostic_managerA diagnostic manager to report errors to.
[in]exe_ctxThe execution context to install the functions into.
Returns
Either llvm::ErrorSuccess or Error with llvm::ErrorInfo

Implemented in lldb_private::ClangDynamicCheckerFunctions.

Member Data Documentation

◆ m_kind

const DynamicCheckerFunctionsKind lldb_private::DynamicCheckerFunctions::m_kind
private

Definition at line 60 of file DynamicCheckerFunctions.h.

Referenced by GetKind().


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