[Lldb-commits] [lldb] ec2c2ad - Add accessors. (NFC)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 12 17:46:05 PDT 2020
Author: Adrian Prantl
Date: 2020-10-12T17:45:49-07:00
New Revision: ec2c2ad2a2dddf24b052625b5ff434704ea43e24
URL: https://github.com/llvm/llvm-project/commit/ec2c2ad2a2dddf24b052625b5ff434704ea43e24
DIFF: https://github.com/llvm/llvm-project/commit/ec2c2ad2a2dddf24b052625b5ff434704ea43e24.diff
LOG: Add accessors. (NFC)
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.
Added:
Modified:
lldb/include/lldb/Symbol/Type.h
lldb/include/lldb/Symbol/Variable.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Symbol/Type.h b/lldb/include/lldb/Symbol/Type.h
index efd3ede03445..06fc1d5da0aa 100644
--- a/lldb/include/lldb/Symbol/Type.h
+++ b/lldb/include/lldb/Symbol/Type.h
@@ -56,6 +56,7 @@ class SymbolFileType : public std::enable_shared_from_this<SymbolFileType>,
Type *operator->() { return GetType(); }
Type *GetType();
+ SymbolFile &GetSymbolFile() const { return m_symbol_file; }
protected:
SymbolFile &m_symbol_file;
diff --git a/lldb/include/lldb/Symbol/Variable.h b/lldb/include/lldb/Symbol/Variable.h
index 66abdc0b3117..37bd9ca68533 100644
--- a/lldb/include/lldb/Symbol/Variable.h
+++ b/lldb/include/lldb/Symbol/Variable.h
@@ -64,6 +64,8 @@ class Variable : public UserID, public std::enable_shared_from_this<Variable> {
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; }
More information about the lldb-commits
mailing list