Add accessors. (NFC)
authorAdrian Prantl <aprantl@apple.com>
Fri, 2 Oct 2020 19:32:01 +0000 (12:32 -0700)
committerAdrian Prantl <aprantl@apple.com>
Tue, 13 Oct 2020 00:45:49 +0000 (17:45 -0700)
There's a place in swift-lldb where it is useful to create a copy of
an lldb_private::Variable. Adding these two accessors makes this
possible.

lldb/include/lldb/Symbol/Type.h
lldb/include/lldb/Symbol/Variable.h

index efd3ede..06fc1d5 100644 (file)
@@ -56,6 +56,7 @@ public:
   Type *operator->() { return GetType(); }
 
   Type *GetType();
+  SymbolFile &GetSymbolFile() const { return m_symbol_file; }
 
 protected:
   SymbolFile &m_symbol_file;
index 66abdc0..37bd9ca 100644 (file)
@@ -64,6 +64,8 @@ public:
 
   lldb::ValueType GetScope() const { return m_scope; }
 
+  const RangeList &GetScopeRange() const { return m_scope_range; }
+
   bool IsExternal() const { return m_external; }
 
   bool IsArtificial() const { return m_artificial; }