@@ -59,6 +59,29 @@ class SwiftASTManipulatorBase {
59
59
unsigned GetType () override { return Type (); }
60
60
};
61
61
62
+ class VariableMetadataPersistent
63
+ : public SwiftASTManipulatorBase::VariableMetadata {
64
+ public:
65
+ VariableMetadataPersistent (
66
+ lldb::ExpressionVariableSP &persistent_variable_sp)
67
+ : m_persistent_variable_sp(persistent_variable_sp) {}
68
+
69
+ static constexpr unsigned Type () { return ' Pers' ; }
70
+ unsigned GetType () override { return Type (); }
71
+ lldb::ExpressionVariableSP m_persistent_variable_sp;
72
+ };
73
+
74
+ class VariableMetadataVariable
75
+ : public SwiftASTManipulatorBase::VariableMetadata {
76
+ public:
77
+ VariableMetadataVariable (lldb::VariableSP &variable_sp)
78
+ : m_variable_sp(variable_sp) {}
79
+
80
+ static constexpr unsigned Type () { return ' Vari' ; }
81
+ unsigned GetType () override { return Type (); }
82
+ lldb::VariableSP m_variable_sp;
83
+ };
84
+
62
85
typedef std::shared_ptr<VariableMetadata> VariableMetadataSP;
63
86
64
87
struct VariableInfo {
@@ -75,8 +98,8 @@ class SwiftASTManipulatorBase {
75
98
VariableInfo () : m_type(), m_name(), m_metadata() {}
76
99
77
100
VariableInfo (CompilerType &type, swift::Identifier name,
78
- VariableMetadataSP metadata,
79
- swift::VarDecl::Introducer introducer,
101
+ VariableMetadataSP metadata,
102
+ swift::VarDecl::Introducer introducer,
80
103
bool is_capture_list = false )
81
104
: m_type(type), m_name(name), m_var_introducer(introducer),
82
105
m_is_capture_list (is_capture_list), m_metadata(metadata) {}
@@ -132,8 +155,8 @@ class SwiftASTManipulatorBase {
132
155
133
156
// / The function containing the expression's code.
134
157
swift::FuncDecl *m_function_decl = nullptr ;
135
- // / The entrypoint function. Null if evaluating an expression outside a method,
136
- // / $__lldb_expr otherswise.
158
+ // / The entrypoint function. Null if evaluating an expression outside a
159
+ // / method, $__lldb_expr otherswise.
137
160
swift::FuncDecl *m_entrypoint_decl = nullptr ;
138
161
// / If evaluating in a generic context, the trampoline function that calls the
139
162
// / method with the user's expression, null otherwise.
0 commit comments