summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ValueObjectConstResultImpl.cpp
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@google.com>2015-07-16 01:47:12 +0000
committerSiva Chandra <sivachandra@google.com>2015-07-16 01:47:12 +0000
commitf8877efc8ba64360179b85af9fd019aae549d1a7 (patch)
tree162796467b673f6dd152707c7c66e46229144016 /lldb/source/Core/ValueObjectConstResultImpl.cpp
parent938bd6fc963af5028a31b315b982ac390786af1b (diff)
downloadbcm5719-llvm-f8877efc8ba64360179b85af9fd019aae549d1a7.tar.gz
bcm5719-llvm-f8877efc8ba64360179b85af9fd019aae549d1a7.zip
Add a class ValueObjectConstResultCast.
Summary: Other changes around the main change include: 1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl and ValueObjectConstResultChild. 2. Add an argument |live_address| of type lldb::addr_t to the constructor of ValueObjectConstResultChild. This is passed on to the backing ValueObjectConstResultImpl object constructor so that the address of the child value can be calculated properly. Reviewers: granata.enrico, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D11203 llvm-svn: 242374
Diffstat (limited to 'lldb/source/Core/ValueObjectConstResultImpl.cpp')
-rw-r--r--lldb/source/Core/ValueObjectConstResultImpl.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObjectConstResultImpl.cpp b/lldb/source/Core/ValueObjectConstResultImpl.cpp
index 733d767b7ee..fce844dc20f 100644
--- a/lldb/source/Core/ValueObjectConstResultImpl.cpp
+++ b/lldb/source/Core/ValueObjectConstResultImpl.cpp
@@ -11,6 +11,7 @@
#include "lldb/Core/ValueObjectChild.h"
#include "lldb/Core/ValueObjectConstResult.h"
+#include "lldb/Core/ValueObjectConstResultCast.h"
#include "lldb/Core/ValueObjectConstResultChild.h"
#include "lldb/Core/ValueObjectMemory.h"
#include "lldb/Core/DataExtractor.h"
@@ -96,7 +97,7 @@ ValueObjectConstResultImpl::CreateChildAtIndex (size_t idx, bool synthetic_array
ConstString child_name;
if (!child_name_str.empty())
child_name.SetCString (child_name_str.c_str());
-
+
valobj = new ValueObjectConstResultChild (*m_impl_backend,
child_clang_type,
child_name,
@@ -155,6 +156,17 @@ ValueObjectConstResultImpl::AddressOf (Error &error)
return m_impl_backend->ValueObject::AddressOf(error);
}
+lldb::ValueObjectSP
+ValueObjectConstResultImpl::Cast (const ClangASTType &clang_ast_type)
+{
+ if (m_impl_backend == NULL)
+ return lldb::ValueObjectSP();
+
+ ValueObjectConstResultCast *result_cast = new ValueObjectConstResultCast(
+ *m_impl_backend, m_impl_backend->GetName(), clang_ast_type, m_live_address);
+ return result_cast->GetSP();
+}
+
lldb::addr_t
ValueObjectConstResultImpl::GetAddressOf (bool scalar_is_load_address,
AddressType *address_type)
OpenPOWER on IntegriCloud