LLDB mainline
lldb_private::dil::Interpreter Class Reference

#include <DILEval.h>

Inheritance diagram for lldb_private::dil::Interpreter:
[legend]

Public Member Functions

 Interpreter (lldb::TargetSP target, llvm::StringRef expr, std::shared_ptr< StackFrame > frame_sp, lldb::DynamicValueType use_dynamic, bool use_synthetic, bool fragile_ivar, bool check_ptr_vs_member)
llvm::Expected< lldb::ValueObjectSPEvaluate (const ASTNode &node)
 Evaluate an ASTNode.

Private Member Functions

llvm::Expected< lldb::ValueObjectSPEvaluateAndDereference (const ASTNode &node)
 Evaluate an ASTNode.
llvm::Expected< lldb::ValueObjectSPVisit (const IdentifierNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const MemberOfNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const UnaryOpNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const ArraySubscriptNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const BitFieldExtractionNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const IntegerLiteralNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const FloatLiteralNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const BooleanLiteralNode &node) override
llvm::Expected< lldb::ValueObjectSPVisit (const CastNode &node) override
llvm::Expected< lldb::ValueObjectSPUnaryConversion (lldb::ValueObjectSP valobj, uint32_t location)
 Perform usual unary conversions on a value.
llvm::Expected< CompilerTypePickIntegerType (lldb::TypeSystemSP type_system, std::shared_ptr< ExecutionContextScope > ctx, const IntegerLiteralNode &literal)
llvm::Expected< CastKindVerifyArithmeticCast (CompilerType source_type, CompilerType target_type, int location)
 A helper function for VerifyCastType (below).
llvm::Expected< CastKindVerifyCastType (lldb::ValueObjectSP operand, CompilerType source_type, CompilerType target_type, int location)
 As a preparation for type casting, compare the requested 'target' type of the cast with the type of the operand to be cast.
Private Member Functions inherited from lldb_private::dil::Visitor
virtual ~Visitor ()=default

Private Attributes

lldb::TargetSP m_target
llvm::StringRef m_expr
lldb::ValueObjectSP m_scope
std::shared_ptr< StackFramem_exe_ctx_scope
lldb::DynamicValueType m_use_dynamic
bool m_use_synthetic
bool m_fragile_ivar
bool m_check_ptr_vs_member

Detailed Description

Definition at line 39 of file DILEval.h.

Constructor & Destructor Documentation

◆ Interpreter()

lldb_private::dil::Interpreter::Interpreter ( lldb::TargetSP target,
llvm::StringRef expr,
std::shared_ptr< StackFrame > frame_sp,
lldb::DynamicValueType use_dynamic,
bool use_synthetic,
bool fragile_ivar,
bool check_ptr_vs_member )

Member Function Documentation

◆ Evaluate()

llvm::Expected< lldb::ValueObjectSP > lldb_private::dil::Interpreter::Evaluate ( const ASTNode & node)

◆ EvaluateAndDereference()

llvm::Expected< lldb::ValueObjectSP > lldb_private::dil::Interpreter::EvaluateAndDereference ( const ASTNode & node)
private

Evaluate an ASTNode.

If the result is a reference, it is also dereferenced using ValueObject::Dereference.

Returns
A non-null lldb::ValueObjectSP or an Error.

Definition at line 278 of file DILEval.cpp.

References error(), and Evaluate().

Referenced by Visit(), and Visit().

◆ PickIntegerType()

◆ UnaryConversion()

llvm::Expected< lldb::ValueObjectSP > lldb_private::dil::Interpreter::UnaryConversion ( lldb::ValueObjectSP valobj,
uint32_t location )
private

◆ VerifyArithmeticCast()

llvm::Expected< CastKind > lldb_private::dil::Interpreter::VerifyArithmeticCast ( CompilerType source_type,
CompilerType target_type,
int location )
private

◆ VerifyCastType()

llvm::Expected< CastKind > lldb_private::dil::Interpreter::VerifyCastType ( lldb::ValueObjectSP operand,
CompilerType source_type,
CompilerType target_type,
int location )
private

As a preparation for type casting, compare the requested 'target' type of the cast with the type of the operand to be cast.

If the cast is allowed, return the appropriate CastKind for the cast; otherwise return an error.

Definition at line 873 of file DILEval.cpp.

References lldb_private::dil::eEnumeration, lldb_private::dil::ePointer, lldb_private::CompilerType::IsArrayType(), lldb_private::CompilerType::IsEnumerationType(), lldb_private::CompilerType::IsInteger(), lldb_private::CompilerType::IsNullPtrType(), lldb_private::CompilerType::IsPointerType(), lldb_private::CompilerType::IsScalarType(), m_expr, lldb_private::CompilerType::TypeDescription(), and VerifyArithmeticCast().

Referenced by Visit().

◆ Visit() [1/9]

◆ Visit() [2/9]

◆ Visit() [3/9]

llvm::Expected< lldb::ValueObjectSP > lldb_private::dil::Interpreter::Visit ( const BooleanLiteralNode & node)
overrideprivatevirtual

◆ Visit() [4/9]

◆ Visit() [5/9]

◆ Visit() [6/9]

◆ Visit() [7/9]

◆ Visit() [8/9]

◆ Visit() [9/9]

Member Data Documentation

◆ m_check_ptr_vs_member

bool lldb_private::dil::Interpreter::m_check_ptr_vs_member
private

Definition at line 105 of file DILEval.h.

Referenced by Interpreter(), and Visit().

◆ m_exe_ctx_scope

std::shared_ptr<StackFrame> lldb_private::dil::Interpreter::m_exe_ctx_scope
private

Definition at line 101 of file DILEval.h.

Referenced by Interpreter(), UnaryConversion(), VerifyArithmeticCast(), Visit(), Visit(), Visit(), and Visit().

◆ m_expr

llvm::StringRef lldb_private::dil::Interpreter::m_expr
private

◆ m_fragile_ivar

bool lldb_private::dil::Interpreter::m_fragile_ivar
private

Definition at line 104 of file DILEval.h.

Referenced by Interpreter(), and Visit().

◆ m_scope

lldb::ValueObjectSP lldb_private::dil::Interpreter::m_scope
private

Definition at line 100 of file DILEval.h.

◆ m_target

lldb::TargetSP lldb_private::dil::Interpreter::m_target
private

Definition at line 98 of file DILEval.h.

Referenced by Interpreter(), UnaryConversion(), Visit(), Visit(), Visit(), Visit(), Visit(), and Visit().

◆ m_use_dynamic

lldb::DynamicValueType lldb_private::dil::Interpreter::m_use_dynamic
private

Definition at line 102 of file DILEval.h.

Referenced by Interpreter(), Visit(), Visit(), Visit(), and Visit().

◆ m_use_synthetic

bool lldb_private::dil::Interpreter::m_use_synthetic
private

Definition at line 103 of file DILEval.h.

Referenced by Interpreter(), Visit(), Visit(), and Visit().


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