9#ifndef LLDB_VALUEOBJECT_DILEVAL_H
10#define LLDB_VALUEOBJECT_DILEVAL_H
15#include "llvm/ADT/StringRef.h"
16#include "llvm/Support/Error.h"
25 ExecutionContext &exe_ctx,
34 ExecutionContext &exe_ctx,
42 ExecutionContext &exe_ctx,
48 ExecutionContext &exe_ctx);
66 llvm::Expected<lldb::ValueObjectSP>
68 llvm::Expected<lldb::ValueObjectSP>
73 llvm::Expected<lldb::ValueObjectSP>
75 llvm::Expected<lldb::ValueObjectSP>
77 llvm::Expected<lldb::ValueObjectSP>
79 llvm::Expected<lldb::ValueObjectSP>
81 llvm::Expected<lldb::ValueObjectSP>
83 llvm::Expected<lldb::ValueObjectSP>
Visit(
const CastNode &node)
override;
84 llvm::Expected<lldb::ValueObjectSP>
86 llvm::Expected<lldb::ValueObjectSP>
Visit(
const SizeOfNode &node)
override;
96 llvm::Expected<lldb::ValueObjectSP>
128 bool rhs_is_literal, uint32_t location);
129 llvm::Expected<lldb::ValueObjectSP>
132 bool rhs_is_literal, uint32_t location);
133 llvm::Expected<lldb::ValueObjectSP>
136 llvm::Expected<lldb::ValueObjectSP>
140 llvm::Expected<lldb::ValueObjectSP>
144 llvm::Expected<lldb::ValueObjectSP>
147 llvm::Expected<lldb::ValueObjectSP>
150 llvm::Expected<lldb::ValueObjectSP>
153 llvm::Expected<lldb::ValueObjectSP>
157 llvm::Expected<CompilerType>
161 llvm::Expected<lldb::ValueObjectSP>
Generic representation of a type in a programming language.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
The rest of the classes in this file, except for the Visitor class at the very end,...
llvm::Expected< lldb::ValueObjectSP > EvaluateBinaryRemainder(lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
llvm::Error ValidateComparison(BinaryOpKind kind, lldb::ValueObjectSP &lhs, lldb::ValueObjectSP &rhs, bool lhs_is_literal, bool rhs_is_literal, uint32_t location)
llvm::Expected< lldb::ValueObjectSP > Evaluate(const ASTNode &node)
Evaluate an ASTNode.
llvm::Expected< lldb::ValueObjectSP > EvaluateBinaryAddition(lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
llvm::Expected< lldb::ValueObjectSP > EvaluateAndDereference(const ASTNode &node)
Evaluate an ASTNode.
llvm::Expected< lldb::ValueObjectSP > PointerOffset(lldb::ValueObjectSP ptr, lldb::ValueObjectSP offset, BinaryOpKind operation, uint32_t location)
Add or subtract the offset to the pointer according to the pointee type byte size.
llvm::Expected< lldb::ValueObjectSP > EvaluateScalarOp(BinaryOpKind kind, lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, CompilerType result_type, uint32_t location)
llvm::Expected< CompilerType > PromoteSignedInteger(CompilerType &lhs_type, CompilerType &rhs_type)
If lhs_type is unsigned and rhs_type is signed, check whether it can represent all of the values of l...
llvm::Expected< lldb::ValueObjectSP > EvaluateBinaryShift(BinaryOpKind kind, lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
llvm::Expected< lldb::ValueObjectSP > EvaluateLogical(const BinaryOpNode &node)
llvm::Expected< lldb::ValueObjectSP > EvaluateTree(const ASTNodeUP &tree)
Evaluate an ASTNode tree.
Interpreter(ExecutionContext &exe_ctx, llvm::StringRef expr, lldb::DynamicValueType use_dynamic, uint32_t options)
llvm::Expected< lldb::ValueObjectSP > EvaluateBinarySubtraction(lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
llvm::Expected< lldb::ValueObjectSP > UnaryConversion(lldb::ValueObjectSP valobj, uint32_t location)
Perform usual unary conversions on a value.
llvm::Expected< lldb::ValueObjectSP > EvaluateComparison(BinaryOpKind kind, lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, bool lhs_is_literal, bool rhs_is_literal, uint32_t location)
llvm::Expected< lldb::ValueObjectSP > Visit(const IdentifierNode &node) override
bool m_check_ptr_vs_member
llvm::Expected< lldb::LanguageType > GetSourceLanguageFromCU()
Retrieve the LanguageType from the compile unit of the current frame.
lldb::ValueObjectSP m_scope
llvm::Expected< lldb::ValueObjectSP > EvaluateBinaryDivision(lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
lldb::DynamicValueType m_use_dynamic
llvm::Expected< CompilerType > PickIntegerType(lldb::TypeSystemSP type_system, ExecutionContext &ext_ctx, const IntegerLiteralNode &literal)
llvm::Expected< CompilerType > ArithmeticConversion(lldb::ValueObjectSP &lhs, lldb::ValueObjectSP &rhs, uint32_t location)
Perform an arithmetic conversion on two values from an arithmetic operation.
llvm::Expected< lldb::ValueObjectSP > EvaluateBinaryMultiplication(lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
llvm::Expected< CastKind > VerifyCastType(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 t...
llvm::Expected< lldb::ValueObjectSP > EvaluateAssignment(lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
llvm::Expected< CastKind > VerifyArithmeticCast(CompilerType source_type, CompilerType target_type, int location)
A helper function for VerifyCastType (below).
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemFromCU()
Retrieve the TypeSystem from the compile unit of the current frame.
llvm::Expected< lldb::ValueObjectSP > EvaluateBinaryBitwise(BinaryOpKind kind, lldb::ValueObjectSP lhs, lldb::ValueObjectSP rhs, uint32_t location)
ExecutionContext m_exe_ctx
This class contains one Visit method for each specialized type of DIL AST node.
std::unique_ptr< ASTNode > ASTNodeUP
lldb::ValueObjectSP LookupPersistentIdentifier(llvm::StringRef name_ref, ExecutionContext &exe_ctx, lldb::LanguageType language)
Given the name of a persistent identifier (i.e., one that starts with a $), find the ValueObject for ...
BinaryOpKind
The binary operators recognized by DIL.
lldb::ValueObjectSP LookupGlobalIdentifier(llvm::StringRef name_ref, ExecutionContext &exe_ctx, lldb::DynamicValueType use_dynamic)
Given the name of an identifier, check to see if it matches the name of a global variable.
lldb::ValueObjectSP LookupIdentifier(llvm::StringRef name_ref, ExecutionContext &exe_ctx, lldb::DynamicValueType use_dynamic)
Given the name of an identifier (variable name, member name, type name, etc.), find the ValueObject f...
lldb::ValueObjectSP LookupEnumValue(llvm::StringRef name_ref, ExecutionContext &exe_ctx)
Given the name of an identifier, attempt to find an enumeration value.
std::shared_ptr< lldb_private::TypeSystem > TypeSystemSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
LanguageType
Programming language type.