summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangPersistentVariables.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-09-04 20:49:51 +0000
committerSean Callanan <scallanan@apple.com>2015-09-04 20:49:51 +0000
commitbc8ac34e61960ac372cfbdc8a9c7ebe87df343b8 (patch)
treec65f757002e1b055ddb6ad857ef5431536477cb4 /lldb/source/Expression/ClangPersistentVariables.cpp
parenta72920410329779314264d9da990c27d405a3fc2 (diff)
downloadbcm5719-llvm-bc8ac34e61960ac372cfbdc8a9c7ebe87df343b8.tar.gz
bcm5719-llvm-bc8ac34e61960ac372cfbdc8a9c7ebe87df343b8.zip
This patch separates the generic portion of ClangExpressionVariable, which
stores information about a variable that different parts of LLDB use, from the compiler-specific portion that only the expression parser cares about. http://reviews.llvm.org/D12602 llvm-svn: 246871
Diffstat (limited to 'lldb/source/Expression/ClangPersistentVariables.cpp')
-rw-r--r--lldb/source/Expression/ClangPersistentVariables.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/lldb/source/Expression/ClangPersistentVariables.cpp b/lldb/source/Expression/ClangPersistentVariables.cpp
index db062d2e20b..13859b81ac8 100644
--- a/lldb/source/Expression/ClangPersistentVariables.cpp
+++ b/lldb/source/Expression/ClangPersistentVariables.cpp
@@ -19,35 +19,29 @@ using namespace lldb;
using namespace lldb_private;
ClangPersistentVariables::ClangPersistentVariables () :
- ClangExpressionVariableList(),
+ ExpressionVariableList(),
m_next_persistent_variable_id (0)
{
}
-ClangExpressionVariableSP
+ExpressionVariableSP
ClangPersistentVariables::CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp)
{
- ClangExpressionVariableSP var_sp (CreateVariable(valobj_sp));
- return var_sp;
+ return ClangExpressionVariable::CreateVariableInList(*this, valobj_sp)->shared_from_this();
}
-ClangExpressionVariableSP
+ClangExpressionVariable *
ClangPersistentVariables::CreatePersistentVariable (ExecutionContextScope *exe_scope,
const ConstString &name,
const TypeFromUser& user_type,
lldb::ByteOrder byte_order,
uint32_t addr_byte_size)
{
- ClangExpressionVariableSP var_sp (GetVariable(name));
-
- if (!var_sp)
- var_sp = CreateVariable(exe_scope, name, user_type, byte_order, addr_byte_size);
-
- return var_sp;
+ return ClangExpressionVariable::CreateVariableInList(*this, exe_scope, name, user_type, byte_order, addr_byte_size);
}
void
-ClangPersistentVariables::RemovePersistentVariable (lldb::ClangExpressionVariableSP variable)
+ClangPersistentVariables::RemovePersistentVariable (lldb::ExpressionVariableSP variable)
{
RemoveVariable(variable);
OpenPOWER on IntegriCloud