diff options
author | Greg Clayton <gclayton@apple.com> | 2014-01-23 22:55:05 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-01-23 22:55:05 +0000 |
commit | 1e3be5ba2c1768e535dee98bf4634e3e89b2caef (patch) | |
tree | 40e562702ae3bdba6b0e6281f18cebea01f0025a /lldb/source/Core/ValueObjectChild.cpp | |
parent | bc8911807cfad2844fe43be13530fc7dd76f3d5c (diff) | |
download | bcm5719-llvm-1e3be5ba2c1768e535dee98bf4634e3e89b2caef.tar.gz bcm5719-llvm-1e3be5ba2c1768e535dee98bf4634e3e89b2caef.zip |
Don't copy entire value into m_data unless we need to. If we did this and the entire variable failed to be read, we wouldn't be able to display any actual values that were in good memory. This will also make things more efficient by not have every struct/union/class/array copy its entire value into a ValueObject.m_data even though no one was using it.
llvm-svn: 199953
Diffstat (limited to 'lldb/source/Core/ValueObjectChild.cpp')
-rw-r--r-- | lldb/source/Core/ValueObjectChild.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index 23add1ccf0e..4547c58d429 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -207,7 +207,10 @@ ValueObjectChild::UpdateValue () if (m_error.Success()) { ExecutionContext exe_ctx (GetExecutionContextRef().Lock()); - m_error = m_value.GetValueAsData (&exe_ctx, m_data, 0, GetModule().get()); + if (GetClangType().GetTypeInfo() & ClangASTType::eTypeHasValue) + m_error = m_value.GetValueAsData (&exe_ctx, m_data, 0, GetModule().get()); + else + m_error.Clear(); // No value so nothing to read... } } else |