Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lldb/include/lldb/ValueObject/DILAST.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ class BuiltinFunctionCallNode : public ASTNode {

class CStyleCastNode : public ASTNode {
public:
CStyleCastNode(uint32_t location, CompilerType type, ASTNodeUP operand,
bool is_rvalue)
: ASTNode(location, NodeKind::eCStyleCastNode), m_type(type),
m_operand(std::move(operand)), m_is_rvalue(is_rvalue) {
m_promo_kind = TypePromotionCastKind::eNone;
}
CStyleCastNode(uint32_t location, CompilerType type, ASTNodeUP operand,
CStyleCastKind kind)
: ASTNode(location, NodeKind::eCStyleCastNode), m_type(type),
Expand All @@ -332,9 +338,7 @@ class CStyleCastNode : public ASTNode {
}

llvm::Expected<lldb::ValueObjectSP> Accept(Visitor *v) const override;
bool is_rvalue() const override {
return m_cast_kind != CStyleCastKind::eReference;
}
bool is_rvalue() const override { return m_is_rvalue; }
CompilerType result_type() const override { return m_type; }
ValueObject *valobj() const override { return m_operand->valobj(); }

Expand All @@ -352,6 +356,7 @@ class CStyleCastNode : public ASTNode {
ASTNodeUP m_operand;
CStyleCastKind m_cast_kind;
TypePromotionCastKind m_promo_kind;
bool m_is_rvalue;
};

class CxxStaticCastNode : public ASTNode {
Expand Down
4 changes: 4 additions & 0 deletions lldb/include/lldb/ValueObject/DILEval.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ class Interpreter : Visitor {
llvm::Error PrepareAssignment(lldb::ValueObjectSP &lhs,
lldb::ValueObjectSP &rhs, uint32_t location);
llvm::Error CheckCompositeAssignment(const BinaryOpNode *node);
llvm::Error PrepareCxxStaticCastForInheritedTypes(
CompilerType type, lldb::ValueObjectSP rhs, uint32_t location,
std::vector<uint32_t> &idx, uint64_t &offset,
CxxStaticCastKind &cast_kind);

lldb::ValueObjectSP EvaluateComparison(BinaryOpKind kind,
lldb::ValueObjectSP lhs,
Expand Down
Loading