summaryrefslogtreecommitdiff
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.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/include/lldb/Symbol/Variable.h b/include/lldb/Symbol/Variable.h
index 8d413cac3d7de..1cac5d0c56498 100644
--- a/include/lldb/Symbol/Variable.h
+++ b/include/lldb/Symbol/Variable.h
@@ -1,4 +1,5 @@
-//===-- Variable.h ----------------------------------------------*- C++ -*-===//
+//===-- Variable.h ----------------------------------------------*- C++
+//-*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -10,6 +11,7 @@
#ifndef liblldb_Variable_h_
#define liblldb_Variable_h_
+#include <memory>
#include <vector>
#include "lldb/lldb-private.h"
@@ -21,7 +23,8 @@
namespace lldb_private {
-class Variable : public UserID
+class Variable : public UserID,
+ public std::enable_shared_from_this<Variable>
{
public:
//------------------------------------------------------------------
@@ -36,7 +39,8 @@ public:
Declaration* decl,
const DWARFExpression& location,
bool external,
- bool artificial);
+ bool artificial,
+ bool static_member = false);
virtual
~Variable();
@@ -58,6 +62,9 @@ public:
ConstString
GetName() const;
+ ConstString
+ GetUnqualifiedName() const;
+
SymbolContextScope *
GetSymbolContextScope() const
{
@@ -99,6 +106,11 @@ public:
return m_artificial;
}
+ bool IsStaticMember() const
+ {
+ return m_static_member;
+ }
+
DWARFExpression &
LocationExpression()
{
@@ -161,6 +173,11 @@ public:
StringList &matches,
bool &word_complete);
+ CompilerDeclContext
+ GetDeclContext ();
+
+ CompilerDecl
+ GetDecl ();
protected:
ConstString m_name; // The basename of the variable (no namespaces)
Mangled m_mangled; // The mangled name of the variable
@@ -171,7 +188,8 @@ protected:
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_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.
private:
Variable(const Variable& rhs);
Variable& operator=(const Variable& rhs);