summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-09-20 17:15:57 +0000
committerAdrian Prantl <aprantl@apple.com>2019-09-20 17:15:57 +0000
commit330014843ceccdcb32463875b3fcd36654e75ad4 (patch)
tree7759b737f4848a9e10e598683cc56e03ec335b88
parenteff88e42f7860ac38cccafd175f5feca4d89c7c3 (diff)
downloadbcm5719-llvm-330014843ceccdcb32463875b3fcd36654e75ad4.tar.gz
bcm5719-llvm-330014843ceccdcb32463875b3fcd36654e75ad4.zip
Doxygenify comments.
llvm-svn: 372411
-rw-r--r--lldb/include/lldb/Symbol/Variable.h75
-rw-r--r--lldb/source/Symbol/Variable.cpp15
2 files changed, 47 insertions, 43 deletions
diff --git a/lldb/include/lldb/Symbol/Variable.h b/lldb/include/lldb/Symbol/Variable.h
index 03a20985462..30f57f1f911 100644
--- a/lldb/include/lldb/Symbol/Variable.h
+++ b/lldb/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;
@@ -107,26 +106,34 @@ public:
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;
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index 3ec97b1fce7..3f3d7c198f1 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -35,14 +35,12 @@
using namespace lldb;
using namespace lldb_private;
-// Variable constructor
-Variable::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, ValueType scope,
- SymbolContextScope *context, const RangeList &scope_range,
- Declaration *decl_ptr, const DWARFExpression &location, bool external,
- bool artificial, bool static_member)
+Variable::Variable(lldb::user_id_t uid, const char *name, const char *mangled,
+ const lldb::SymbolFileTypeSP &symfile_type_sp,
+ ValueType scope, SymbolContextScope *context,
+ const RangeList &scope_range, Declaration *decl_ptr,
+ const DWARFExpression &location, bool external,
+ bool artificial, bool static_member)
: UserID(uid), m_name(name), m_mangled(ConstString(mangled)),
m_symfile_type_sp(symfile_type_sp), m_scope(scope),
m_owner_scope(context), m_scope_range(scope_range),
@@ -50,7 +48,6 @@ Variable::Variable(
m_artificial(artificial), m_loc_is_const_data(false),
m_static_member(static_member) {}
-// Destructor
Variable::~Variable() {}
lldb::LanguageType Variable::GetLanguage() const {
OpenPOWER on IntegriCloud