aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Symbol/Variable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Symbol/Variable.h')
-rw-r--r--include/lldb/Symbol/Variable.h79
1 files changed, 43 insertions, 36 deletions
diff --git a/include/lldb/Symbol/Variable.h b/include/lldb/Symbol/Variable.h
index 12daecfc04e6..30f57f1f9110 100644
--- a/include/lldb/Symbol/Variable.h
+++ b/include/lldb/Symbol/Variable.h
@@ -26,15 +26,14 @@ class Variable : public UserID, public std::enable_shared_from_this<Variable> {
public:
typedef RangeVector<lldb::addr_t, lldb::addr_t> RangeList;
- // Constructors and Destructors
- Variable(lldb::user_id_t uid, const char *name,
- const char
- *mangled, // The mangled or fully qualified name of the variable.
- const lldb::SymbolFileTypeSP &symfile_type_sp,
- lldb::ValueType scope, SymbolContextScope *owner_scope,
- const RangeList &scope_range, Declaration *decl,
- const DWARFExpression &location, bool external, bool artificial,
- bool static_member = false);
+ /// Constructors and Destructors.
+ ///
+ /// \param mangled The mangled or fully qualified name of the variable.
+ Variable(lldb::user_id_t uid, const char *name, const char *mangled,
+ const lldb::SymbolFileTypeSP &symfile_type_sp, lldb::ValueType scope,
+ SymbolContextScope *owner_scope, const RangeList &scope_range,
+ Declaration *decl, const DWARFExpression &location, bool external,
+ bool artificial, bool static_member = false);
virtual ~Variable();
@@ -50,11 +49,11 @@ public:
SymbolContextScope *GetSymbolContextScope() const { return m_owner_scope; }
- // Since a variable can have a basename "i" and also a mangled named
- // "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous
- // namespace)::i", this function will allow a generic match function that can
- // be called by commands and expression parsers to make sure we match
- // anything we come across.
+ /// Since a variable can have a basename "i" and also a mangled named
+ /// "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous
+ /// namespace)::i", this function will allow a generic match function that can
+ /// be called by commands and expression parsers to make sure we match
+ /// anything we come across.
bool NameMatches(ConstString name) const;
bool NameMatches(const RegularExpression &regex) const;
@@ -99,34 +98,42 @@ public:
GetVariableCallback callback, void *baton, VariableList &variable_list,
ValueObjectList &valobj_list);
- static size_t AutoComplete(const ExecutionContext &exe_ctx,
- CompletionRequest &request);
+ static void AutoComplete(const ExecutionContext &exe_ctx,
+ CompletionRequest &request);
CompilerDeclContext GetDeclContext();
CompilerDecl GetDecl();
protected:
- ConstString m_name; // The basename of the variable (no namespaces)
- Mangled m_mangled; // The mangled name of the variable
- lldb::SymbolFileTypeSP m_symfile_type_sp; // The type pointer of the variable
- // (int, struct, class, etc)
- lldb::ValueType m_scope; // global, parameter, local
- SymbolContextScope
- *m_owner_scope; // The symbol file scope that this variable was defined in
- RangeList m_scope_range; // The list of ranges inside the owner's scope where
- // this variable is valid
- Declaration m_declaration; // Declaration location for this item.
- DWARFExpression m_location; // The location of this variable that can be fed
- // to DWARFExpression::Evaluate()
- uint8_t m_external : 1, // Visible outside the containing compile unit?
- m_artificial : 1, // Non-zero if the variable is not explicitly declared
- // in source
- m_loc_is_const_data : 1, // The m_location expression contains the
- // constant variable value data, not a DWARF
- // location
- m_static_member : 1; // Non-zero if variable is static member of a class
- // or struct.
+ /// The basename of the variable (no namespaces).
+ ConstString m_name;
+ /// The mangled name of the variable.
+ Mangled m_mangled;
+ /// The type pointer of the variable (int, struct, class, etc)
+ /// global, parameter, local.
+ lldb::SymbolFileTypeSP m_symfile_type_sp;
+ lldb::ValueType m_scope;
+ /// The symbol file scope that this variable was defined in
+ SymbolContextScope *m_owner_scope;
+ /// The list of ranges inside the owner's scope where this variable
+ /// is valid.
+ RangeList m_scope_range;
+ /// Declaration location for this item.
+ Declaration m_declaration;
+ /// The location of this variable that can be fed to
+ /// DWARFExpression::Evaluate().
+ DWARFExpression m_location;
+ /// Visible outside the containing compile unit?
+ unsigned m_external : 1;
+ /// Non-zero if the variable is not explicitly declared in source.
+ unsigned m_artificial : 1;
+ /// The m_location expression contains the constant variable value
+ /// data, not a DWARF location.
+ unsigned m_loc_is_const_data : 1;
+ /// Non-zero if variable is static member of a class or struct.
+ unsigned m_static_member : 1;
+
private:
Variable(const Variable &rhs) = delete;
Variable &operator=(const Variable &rhs) = delete;