From 9301ec11910dbb7fd13becd0e77b0a1faeff5915 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Thu, 1 Oct 2015 23:07:06 +0000 Subject: Eliminated redundant "constructors" for ClangExpressionVariable. The ClangExpressionVariable::CreateVariableInList functions looked cute, but caused more confusion than they solved. I removed them, and instead made sure that there are adequate facilities for easily adding newly-constructed ExpressionVariables to lists. I also made some of the constructors that are common be generic, so that it's possible to construct expression variables from generic places (like the ABI and ValueObject) without having to know the specifics about the class. llvm-svn: 249095 --- .../ExpressionParser/Clang/ClangExpressionVariable.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp') diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp index f78ee3a8f62..908546b3ecd 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.cpp @@ -53,6 +53,21 @@ ClangExpressionVariable::ClangExpressionVariable (const lldb::ValueObjectSP &val m_frozen_sp = valobj_sp; } +ClangExpressionVariable::ClangExpressionVariable(ExecutionContextScope *exe_scope, + const ConstString &name, + const TypeFromUser& user_type, + lldb::ByteOrder byte_order, + uint32_t addr_byte_size) : + ExpressionVariable(LLVMCastKind::eKindClang), + m_parser_vars(), + m_jit_vars() +{ + m_flags = EVNone; + m_frozen_sp = ValueObjectConstResult::Create (exe_scope, byte_order, addr_byte_size); + SetName (name); + SetCompilerType (user_type); +} + TypeFromUser ClangExpressionVariable::GetTypeFromUser() { -- cgit v1.2.3